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
30 stars 15 forks source link

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

Open esteblock opened 10 months ago

esteblock commented 10 months ago

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

esteblock commented 2 months ago

/packages/types/src/index.tsx

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

export type ChainMetadata = WalletChain
esteblock commented 2 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 2 months ago

@esteblock please can I be assigned to this