Skip to content

Commit 4120bf7

Browse files
committed
fix(sdk-coin-vet): add gastankfactor vet
COIN-4972 TICKET: COIN-4972
1 parent 11de7f2 commit 4120bf7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

modules/sdk-coin-vet/test/unit/vet.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import assert from 'assert';
33
import _ from 'lodash';
44
import { BitGoAPI } from '@bitgo/sdk-api';
55
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
6-
import { coins } from '@bitgo/statics';
6+
import { coins, GasTankAccountCoin } from '@bitgo/statics';
77
import { Vet, Tvet, Transaction } from '../../src';
88
import * as testData from '../resources/vet';
99

@@ -39,6 +39,8 @@ describe('Vechain', function () {
3939
it('should return the right info', function () {
4040
const vet = bitgo.coin('vet');
4141
const tvet = bitgo.coin('tvet');
42+
const vetStatics = coins.get('vet') as GasTankAccountCoin;
43+
const tvetStatics = coins.get('tvet') as GasTankAccountCoin;
4244

4345
vet.getChain().should.equal('vet');
4446
vet.getFamily().should.equal('vet');
@@ -49,6 +51,11 @@ describe('Vechain', function () {
4951
tvet.getFamily().should.equal('vet');
5052
tvet.getFullName().should.equal('Testnet VeChain');
5153
tvet.getBaseFactor().should.equal(1e18);
54+
55+
vetStatics.gasTankLowBalanceAlertFactor.should.equal(80);
56+
tvetStatics.gasTankLowBalanceAlertFactor.should.equal(80);
57+
vetStatics.gasTankMinBalanceRecommendationFactor.should.equal(200);
58+
tvetStatics.gasTankMinBalanceRecommendationFactor.should.equal(200);
5259
});
5360

5461
it('should validate address', function () {

modules/statics/src/coins.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ export const coins = CoinMap.fromCoins([
16461646
POLYX_FEATURES,
16471647
KeyCurve.Ed25519
16481648
),
1649-
account(
1649+
gasTankAccount(
16501650
'98071460-1488-4edd-857f-0899bc5eee4f',
16511651
'vet',
16521652
'Mainnet VET',
@@ -1655,9 +1655,11 @@ export const coins = CoinMap.fromCoins([
16551655
UnderlyingAsset.VET,
16561656
BaseUnit.ETH, // The smallest unit of VET, similar to Ethereum, is called 'wei'.
16571657
VET_FEATURES,
1658-
KeyCurve.Secp256k1
1658+
KeyCurve.Secp256k1,
1659+
80,
1660+
200
16591661
),
1660-
account(
1662+
gasTankAccount(
16611663
'b3158e80-f6ea-4922-98ab-d773a680ce76',
16621664
'tvet',
16631665
'Testnet VET',
@@ -1666,7 +1668,9 @@ export const coins = CoinMap.fromCoins([
16661668
UnderlyingAsset.VET,
16671669
BaseUnit.ETH,
16681670
VET_FEATURES,
1669-
KeyCurve.Secp256k1
1671+
KeyCurve.Secp256k1,
1672+
80,
1673+
200
16701674
),
16711675
erc20CompatibleAccountCoin(
16721676
'bfae821b-cf3a-4190-b1a8-a54af51d730e',

0 commit comments

Comments
 (0)