Skip to content

Commit 118a7cf

Browse files
authored
Merge pull request #8796 from BitGo/fix/cgd-726-avax-legacy-chain-id-map
fix(statics): correct Avalanche C-Chain entries in LEGACY_CHAIN_ID_MAP
2 parents 642859b + fdd06f5 commit 118a7cf

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

modules/statics/src/map.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export class CoinMap {
113113
11142220: 'tcelo',
114114
2222: 'kava',
115115
2221: 'tkava',
116-
43114: 'avax',
117-
43113: 'tavax',
116+
43114: 'avaxc',
117+
43113: 'tavaxc',
118118
100: 'gno',
119119
130: 'unieth',
120120
1301: 'tunieth',

modules/statics/test/unit/coins.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,18 @@ describe('CoinMap', function () {
857857
should(ethCoinName).not.be.undefined();
858858
ethCoinName!.should.equal('eth');
859859
});
860+
861+
it('should map Avalanche C-Chain chain IDs to registered coin names', () => {
862+
const avaxcName = coins.coinNameFromChainId(43114);
863+
should(avaxcName).not.be.undefined();
864+
avaxcName!.should.equal('avaxc');
865+
should(() => coins.get(avaxcName!)).not.throw();
866+
867+
const tavaxcName = coins.coinNameFromChainId(43113);
868+
should(tavaxcName).not.be.undefined();
869+
tavaxcName!.should.equal('tavaxc');
870+
should(() => coins.get(tavaxcName!)).not.throw();
871+
});
860872
});
861873
});
862874

0 commit comments

Comments
 (0)