Skip to content

Commit

Permalink
feat(sdk-coin-bera): add bera token support
Browse files Browse the repository at this point in the history
Ticket: WIN-3493
  • Loading branch information
adarsh312 committed Sep 30, 2024
1 parent b52bfed commit 11727f9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions modules/sdk-coin-bera/src/register.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { BitGoBase } from '@bitgo/sdk-core';
import { Bera } from './bera';
import { Tbera } from './tbera';
import { BeraToken } from './beraToken';

export const register = (sdk: BitGoBase): void => {
sdk.register('bera', Bera.createInstance);
sdk.register('tbera', Tbera.createInstance);
BeraToken.createTokenConstructors().forEach(({ name, coinConstructor }) => {
sdk.register(name, coinConstructor);
});
};
2 changes: 1 addition & 1 deletion modules/sdk-coin-bera/test/unit/beraToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Bera Token:', function () {
bgtTokenCoin.getFullName().should.equal('Bera Token');
bgtTokenCoin.getBaseFactor().should.equal(1e18);
bgtTokenCoin.type.should.equal(tokenName);
bgtTokenCoin.name.should.equal('Bera Test BGT');
bgtTokenCoin.name.should.equal('Bera Testnet BGT');
bgtTokenCoin.coin.should.equal('tarbeth');
bgtTokenCoin.network.should.equal('Testnet');
bgtTokenCoin.decimalPlaces.should.equal(18);
Expand Down
4 changes: 2 additions & 2 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17973,14 +17973,14 @@ export const coins = CoinMap.fromCoins([
'bera:bgt',
'BGT Token',
18,
// TODO: the mainnet contract address is still not available, adding placeholder her
// TODO: the mainnet contract address is still not available, adding placeholder here
'0xbda130737bdd9618301681329bf2e46a016ff9aa',
UnderlyingAsset['bera:bgt']
),
tberaErc20(
'24af5e18-ab4b-43e5-80db-0ddb9beb01b3',
'tbera:bgt',
'bera Test BGT',
'Bera Testnet BGT',
18,
'0xbda130737bdd9618301681329bf2e46a016ff9ad',
UnderlyingAsset['tbera:bgt']
Expand Down
2 changes: 1 addition & 1 deletion modules/statics/src/tokenConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export const tokens: Tokens = {
tokens: formattedSuiTokens.filter((token) => token.network === 'Testnet'),
},
bera: {
tokens: formattedArbethTokens.filter((token) => token.network === 'Testnet'),
tokens: formattedBeraTokens.filter((token) => token.network === 'Testnet'),
},
},
};
Expand Down

0 comments on commit 11727f9

Please sign in to comment.