paltalabs / soroban-react

@soroban-react is a simple, powerful framework for building modern Soroban dApps using React.
https://soroban-react.paltalabs.io/
Apache License 2.0
31 stars 15 forks source link

Refactor: Merge NetworkDetails, WalletChain, ChainName, ChainMetadata objects #70

Open esteblock opened 1 year ago

esteblock commented 1 year ago

There is reduntant information in these objects https://github.com/paltalabs/soroban-react/blob/main/packages/types/src/index.tsx

esteblock commented 3 months ago

/packages/types/src/index.tsx

export type ChainName =
  | 'futurenet'
  | 'public'
  | 'testnet'
  | 'sandbox'
  | 'standalone'

export type ChainMetadata = WalletChain
esteblock commented 3 months ago

packages/types/src/index.tsx

export interface NetworkDetails {
  network: string
  networkUrl: string
  networkPassphrase: string
  sorobanRpcUrl?: string
}

export interface WalletChain {
  id: string
  name?: string
  networkPassphrase: string
  iconBackground?: string
  iconUrl?: string | null
  unsupported?: boolean
  network: string
  networkUrl: string
  sorobanRpcUrl?: string
}
ShantelPeters commented 3 months ago

@esteblock please can I be assigned to this