getCoin static method

CryptoCoins? getCoin(
  1. String name,
  2. CryptoProposal proposal
)

Implementation

static CryptoCoins? getCoin(String name, CryptoProposal proposal) {
  switch (proposal) {
    case BipProposal.bip44:
      return Bip44Coins.fromName(name);
    case BipProposal.bip49:
      return Bip49Coins.fromName(name);
    case BipProposal.bip84:
      return Bip84Coins.fromName(name);
    case BipProposal.bip86:
      return Bip86Coins.fromName(name);
    case CipProposal.cip1852:
      return Cip1852Coins.fromName(name);
    default:
      return null;
  }
}