Skip to content

Commit b573f1b

Browse files
committed
feat(statics): add CoinFeature.STAKING to txdc coin features
Enable staking feature for txdc (testnet XDC) so WalletPlatform and bitgo-ui can identify XDC testnet as staking-capable. The mainnet xdc coin is intentionally left unchanged pending full go-live. - Add CoinFeature.STAKING to txdc via inline spread in allCoinsAndTokens.ts - Add txdc to coinsWithExcludedFeatures in statics unit test - Add STAKING feature assertion to sdk-coin-xdc test Ticket: SC-5664
1 parent ca9bdb3 commit b573f1b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
44
import { BitGoAPI } from '@bitgo/sdk-api';
55

66
import { Xdc, Txdc } from '../../src/index';
7+
import { CoinFeature } from '@bitgo/statics';
78
import { UnsignedSweepTxMPCv2 } from '@bitgo/abstract-eth';
89
import { mockDataUnsignedSweep, mockDataNonBitGoRecovery } from '../resources';
910
import nock from 'nock';
@@ -43,6 +44,7 @@ describe('xdc', function () {
4344
txdc.getBaseFactor().should.equal(1e18);
4445
txdc.supportsTss().should.equal(true);
4546
txdc.allowsAccountConsolidations().should.equal(false);
47+
txdc.features.includes(CoinFeature.STAKING).should.equal(true);
4648
});
4749
});
4850
});

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ export const allCoinsAndTokens = [
15381538
18,
15391539
UnderlyingAsset.XDC,
15401540
BaseUnit.ETH,
1541-
XDC_FEATURES
1541+
[...XDC_FEATURES, CoinFeature.STAKING]
15421542
),
15431543
account(
15441544
'297edf01-b166-45fb-be6f-da6680635f72',

modules/statics/test/unit/coins.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,9 @@ const coinsWithExcludedFeatures: Record<string, { features: CoinFeature[] }> = {
725725
CoinFeature.CUSTODY_BITGO_FRANKFURT,
726726
],
727727
},
728+
txdc: {
729+
features: [CoinFeature.STAKING],
730+
},
728731
};
729732

730733
describe('CoinMap', function () {

0 commit comments

Comments
 (0)