Skip to content

Commit b800afa

Browse files
Merge pull request #6538 from BitGo/COIN-4972-add-vet-configs
fix(sdk-coin-vet): add gastankfactor vet
2 parents dfea51b + 4120bf7 commit b800afa

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
@@ -1649,7 +1649,7 @@ export const coins = CoinMap.fromCoins([
16491649
POLYX_FEATURES,
16501650
KeyCurve.Ed25519
16511651
),
1652-
account(
1652+
gasTankAccount(
16531653
'98071460-1488-4edd-857f-0899bc5eee4f',
16541654
'vet',
16551655
'Mainnet VET',
@@ -1658,9 +1658,11 @@ export const coins = CoinMap.fromCoins([
16581658
UnderlyingAsset.VET,
16591659
BaseUnit.ETH, // The smallest unit of VET, similar to Ethereum, is called 'wei'.
16601660
VET_FEATURES,
1661-
KeyCurve.Secp256k1
1661+
KeyCurve.Secp256k1,
1662+
80,
1663+
200
16621664
),
1663-
account(
1665+
gasTankAccount(
16641666
'b3158e80-f6ea-4922-98ab-d773a680ce76',
16651667
'tvet',
16661668
'Testnet VET',
@@ -1669,7 +1671,9 @@ export const coins = CoinMap.fromCoins([
16691671
UnderlyingAsset.VET,
16701672
BaseUnit.ETH,
16711673
VET_FEATURES,
1672-
KeyCurve.Secp256k1
1674+
KeyCurve.Secp256k1,
1675+
80,
1676+
200
16731677
),
16741678
erc20CompatibleAccountCoin(
16751679
'bfae821b-cf3a-4190-b1a8-a54af51d730e',

0 commit comments

Comments
 (0)