Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion modules/sdk-coin-vet/test/unit/vet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import assert from 'assert';
import _ from 'lodash';
import { BitGoAPI } from '@bitgo/sdk-api';
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
import { coins } from '@bitgo/statics';
import { coins, GasTankAccountCoin } from '@bitgo/statics';
import { Vet, Tvet, Transaction } from '../../src';
import * as testData from '../resources/vet';

Expand Down Expand Up @@ -39,6 +39,8 @@ describe('Vechain', function () {
it('should return the right info', function () {
const vet = bitgo.coin('vet');
const tvet = bitgo.coin('tvet');
const vetStatics = coins.get('vet') as GasTankAccountCoin;
const tvetStatics = coins.get('tvet') as GasTankAccountCoin;

vet.getChain().should.equal('vet');
vet.getFamily().should.equal('vet');
Expand All @@ -49,6 +51,11 @@ describe('Vechain', function () {
tvet.getFamily().should.equal('vet');
tvet.getFullName().should.equal('Testnet VeChain');
tvet.getBaseFactor().should.equal(1e18);

vetStatics.gasTankLowBalanceAlertFactor.should.equal(80);
tvetStatics.gasTankLowBalanceAlertFactor.should.equal(80);
vetStatics.gasTankMinBalanceRecommendationFactor.should.equal(200);
tvetStatics.gasTankMinBalanceRecommendationFactor.should.equal(200);
});

it('should validate address', function () {
Expand Down
12 changes: 8 additions & 4 deletions modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ export const coins = CoinMap.fromCoins([
POLYX_FEATURES,
KeyCurve.Ed25519
),
account(
gasTankAccount(
'98071460-1488-4edd-857f-0899bc5eee4f',
'vet',
'Mainnet VET',
Expand All @@ -1655,9 +1655,11 @@ export const coins = CoinMap.fromCoins([
UnderlyingAsset.VET,
BaseUnit.ETH, // The smallest unit of VET, similar to Ethereum, is called 'wei'.
VET_FEATURES,
KeyCurve.Secp256k1
KeyCurve.Secp256k1,
80,
200
),
account(
gasTankAccount(
'b3158e80-f6ea-4922-98ab-d773a680ce76',
'tvet',
'Testnet VET',
Expand All @@ -1666,7 +1668,9 @@ export const coins = CoinMap.fromCoins([
UnderlyingAsset.VET,
BaseUnit.ETH,
VET_FEATURES,
KeyCurve.Secp256k1
KeyCurve.Secp256k1,
80,
200
),
erc20CompatibleAccountCoin(
'bfae821b-cf3a-4190-b1a8-a54af51d730e',
Expand Down