diff --git a/multichain.go b/multichain.go index 67286fac..a56c221a 100644 --- a/multichain.go +++ b/multichain.go @@ -178,7 +178,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case AVAX, BNB, ETH, FIL, GLMR, LUNA, MATIC, ArbETH: + case ArbETH, AVAX, BNB, ETH, FIL, FTM, GLMR, LUNA, MATIC, SOL: return ChainTypeAccountBased // These assets are handled separately because they are mock assets. These @@ -217,8 +217,8 @@ type Chain string // human-readable string to this set of enumerated values. Chains must be listed // in alphabetical order. const ( - Avalanche = Chain("Avalanche") Arbitrum = Chain("Arbitrum") + Avalanche = Chain("Avalanche") BinanceSmartChain = Chain("BinanceSmartChain") Bitcoin = Chain("Bitcoin") BitcoinCash = Chain("BitcoinCash") diff --git a/multichain_test.go b/multichain_test.go index 2b3e37a4..973d9a4c 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -176,7 +176,9 @@ var _ = Describe("Multichain", func() { accountChain := accountChain Specify(fmt.Sprintf("Chain=%v, Asset=%v should be supported", accountChain.chain, accountChain.asset), func() { Expect(accountChain.chain.IsAccountBased()).To(BeTrue()) + Expect(accountChain.chain.ChainType()).To(Equal(multichain.ChainTypeAccountBased)) Expect(accountChain.chain.NativeAsset()).To(Equal(accountChain.asset)) + Expect(accountChain.asset.ChainType()).To(Equal(multichain.ChainTypeAccountBased)) Expect(accountChain.asset.OriginChain()).To(Equal(accountChain.chain)) }) } @@ -184,7 +186,9 @@ var _ = Describe("Multichain", func() { utxoChain := utxoChain Specify(fmt.Sprintf("Chain=%v, Asset=%v should be supported", utxoChain.chain, utxoChain.asset), func() { Expect(utxoChain.chain.IsUTXOBased()).To(BeTrue()) + Expect(utxoChain.chain.ChainType()).To(Equal(multichain.ChainTypeUTXOBased)) Expect(utxoChain.chain.NativeAsset()).To(Equal(utxoChain.asset)) + Expect(utxoChain.asset.ChainType()).To(Equal(multichain.ChainTypeUTXOBased)) Expect(utxoChain.asset.OriginChain()).To(Equal(utxoChain.chain)) }) }