|
| 1 | +import 'should'; |
| 2 | + |
| 3 | +import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; |
| 4 | +import { BitGoAPI } from '@bitgo/sdk-api'; |
| 5 | +import { JettonToken } from '../../src'; |
| 6 | + |
| 7 | +describe('Jetton Tokens', function () { |
| 8 | + let bitgo: TestBitGoAPI; |
| 9 | + let testnetJettonToken; |
| 10 | + const testnetTokenName = 'tton:ukwny-us'; |
| 11 | + |
| 12 | + before(function () { |
| 13 | + bitgo = TestBitGo.decorate(BitGoAPI, { env: 'test' }); |
| 14 | + JettonToken.createTokenConstructors().forEach(({ name, coinConstructor }) => { |
| 15 | + bitgo.safeRegister(name, coinConstructor); |
| 16 | + }); |
| 17 | + bitgo.initializeTestVars(); |
| 18 | + testnetJettonToken = bitgo.coin(testnetTokenName); |
| 19 | + }); |
| 20 | + |
| 21 | + it('should return constants for Testnet Ton token', function () { |
| 22 | + testnetJettonToken.getChain().should.equal(testnetTokenName); |
| 23 | + testnetJettonToken.getBaseChain().should.equal('tton'); |
| 24 | + testnetJettonToken.getFullName().should.equal('Ton Token'); |
| 25 | + testnetJettonToken.getBaseFactor().should.equal(1e9); |
| 26 | + testnetJettonToken.type.should.equal(testnetTokenName); |
| 27 | + testnetJettonToken.name.should.equal('Test Unknown TokenY-US'); |
| 28 | + testnetJettonToken.coin.should.equal('tton'); |
| 29 | + testnetJettonToken.network.should.equal('Testnet'); |
| 30 | + testnetJettonToken.contractAddress.should.equal('kQD8EQMavE1w6gvgMXUhN8hi7pSk4bKYM-W2dgkNqV54Y16Y'); |
| 31 | + testnetJettonToken.decimalPlaces.should.equal(9); |
| 32 | + }); |
| 33 | +}); |
0 commit comments