-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sdk-coin-bsc): rename bsc to bnb
Ticket: EA-709
- Loading branch information
Showing
23 changed files
with
165 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from './lib'; | ||
export * from './bsc'; | ||
export * from './tbsc'; | ||
export * from './bscToken'; | ||
export * from './bnb'; | ||
export * from './tbnb'; | ||
export * from './bnbToken'; | ||
export * from './register'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { BitGoBase } from '@bitgo/sdk-core'; | ||
import { Bsc } from './bsc'; | ||
import { BscToken } from './bscToken'; | ||
import { Tbsc } from './tbsc'; | ||
import { Bnb } from './bnb'; | ||
import { BnbToken } from './bnbToken'; | ||
import { Tbnb } from './tbnb'; | ||
|
||
export const register = (sdk: BitGoBase): void => { | ||
sdk.register('bsc', Bsc.createInstance); | ||
sdk.register('tbsc', Tbsc.createInstance); | ||
BscToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { | ||
sdk.register('bnb', Bnb.createInstance); | ||
sdk.register('tbnb', Tbnb.createInstance); | ||
BnbToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { | ||
sdk.register(name, coinConstructor); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import 'should'; | ||
|
||
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; | ||
import { BscToken } from '../../src'; | ||
import { BnbToken } from '../../src'; | ||
import { BitGoAPI } from '@bitgo/sdk-api'; | ||
|
||
describe('Bsc Token:', function () { | ||
describe('Bnb Token:', function () { | ||
let bitgo: TestBitGoAPI; | ||
let bscTokenCoin; | ||
const tokenName = 'tbsc:busd'; | ||
let bnbTokenCoin; | ||
const tokenName = 'tbnb:busd'; | ||
|
||
before(function () { | ||
bitgo = TestBitGo.decorate(BitGoAPI, { env: 'test' }); | ||
BscToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { | ||
BnbToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { | ||
bitgo.safeRegister(name, coinConstructor); | ||
}); | ||
bitgo.initializeTestVars(); | ||
bscTokenCoin = bitgo.coin(tokenName); | ||
bnbTokenCoin = bitgo.coin(tokenName); | ||
}); | ||
|
||
it('should return constants', function () { | ||
bscTokenCoin.getChain().should.equal('tbsc:busd'); | ||
bscTokenCoin.getBaseChain().should.equal('tbsc'); | ||
bscTokenCoin.getFullName().should.equal('Bsc Token'); | ||
bscTokenCoin.getBaseFactor().should.equal(1e18); | ||
bscTokenCoin.type.should.equal(tokenName); | ||
bscTokenCoin.name.should.equal('Test Binance USD Token'); | ||
bscTokenCoin.coin.should.equal('tbsc'); | ||
bscTokenCoin.network.should.equal('Testnet'); | ||
bscTokenCoin.decimalPlaces.should.equal(18); | ||
bnbTokenCoin.getChain().should.equal('tbnb:busd'); | ||
bnbTokenCoin.getBaseChain().should.equal('tbnb'); | ||
bnbTokenCoin.getFullName().should.equal('Bnb Token'); | ||
bnbTokenCoin.getBaseFactor().should.equal(1e18); | ||
bnbTokenCoin.type.should.equal(tokenName); | ||
bnbTokenCoin.name.should.equal('Test BNB USD Token'); | ||
bnbTokenCoin.coin.should.equal('tbnb'); | ||
bnbTokenCoin.network.should.equal('Testnet'); | ||
bnbTokenCoin.decimalPlaces.should.equal(18); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.