-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5541 from BitGo/WIN-4540-alter-tokenAddress-for-sol
chore(sdk-coin-sol): use contractAddress to form tokenAddress
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'should'; | ||
import { BitGoAPI } from '@bitgo/sdk-api'; | ||
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; | ||
import { SolToken } from '../../src'; | ||
|
||
describe('SOL Token:', function () { | ||
let bitgo: TestBitGoAPI; | ||
let solTokenCoin; | ||
const tokenName = 'sol:spx'; | ||
|
||
before(function () { | ||
bitgo = TestBitGo.decorate(BitGoAPI, { env: 'test' }); | ||
SolToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { | ||
bitgo.safeRegister(name, coinConstructor); | ||
}); | ||
bitgo.initializeTestVars(); | ||
solTokenCoin = bitgo.coin(tokenName); | ||
}); | ||
|
||
it('should return constants', function () { | ||
solTokenCoin.getChain().should.equal(tokenName); | ||
solTokenCoin.getBaseChain().should.equal('sol'); | ||
solTokenCoin.getBaseFactor().should.equal(1e8); | ||
solTokenCoin.getFullName().should.equal('Solana Token'); | ||
solTokenCoin.coin.should.equal('sol'); | ||
solTokenCoin.decimalPlaces.should.equal(8); | ||
solTokenCoin.network.should.equal('Mainnet'); | ||
solTokenCoin.tokenAddress.should.equal('J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr'); | ||
solTokenCoin.contractAddress.should.equal('J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr'); | ||
}); | ||
}); |
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