Skip to content

Commit c1764a6

Browse files
committed
feat(sdk-coin-canton): enabling unspents tab for cc
Ticket: CHALO-331
1 parent 56ad471 commit c1764a6

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ describe('DOT:', function () {
263263
const accountInfoCB = sandBox.stub(Dot.prototype, 'getAccountInfo' as keyof Dot);
264264
accountInfoCB.withArgs(testData.wrwUser.walletAddress0).resolves({
265265
nonce: nonce,
266-
freeBalance: 8888,
266+
// Must exceed stubbed getFee so recover() does not throw (matches getFee withArgs amount).
267+
freeBalance: 1510000000000,
267268
});
268269
const headerInfoCB = sandBox.stub(Dot.prototype, 'getHeaderInfo' as keyof Dot);
269270
headerInfoCB.resolves({
@@ -275,7 +276,11 @@ describe('DOT:', function () {
275276
freeBalance: 1510000000000,
276277
});
277278
const getFeeCB = sandBox.stub(Dot.prototype, 'getFee' as keyof Dot);
279+
// Default avoids RPC when tests use a recoveryDestination other than destAddr (e.g. unsigned sweep fixture).
280+
getFeeCB.resolves(15783812856);
278281
getFeeCB.withArgs(destAddr, testData.wrwUser.walletAddress0, 1510000000000).resolves(15783812856);
282+
const getMaterialCB = sandBox.stub(Dot.prototype, 'getMaterial' as keyof Dot);
283+
getMaterialCB.resolves(utils.getMaterial(coins.get('tdot')));
279284
});
280285

281286
afterEach(function () {
@@ -461,6 +466,8 @@ describe('DOT:', function () {
461466
getFeeCB.withArgs(baseAddr, testData.consolidationWrwUser.walletAddress1, 10000000000).resolves(15783812856);
462467
getFeeCB.withArgs(baseAddr, testData.consolidationWrwUser.walletAddress2, 1510000000000).resolves(15783812856);
463468
getFeeCB.withArgs(baseAddr, testData.consolidationWrwUser.walletAddress3, 1510000000000).resolves(15783812856);
469+
const getMaterialCB = sandBox.stub(Dot.prototype, 'getMaterial' as keyof Dot);
470+
getMaterialCB.resolves(utils.getMaterial(coins.get('tdot')));
464471
});
465472

466473
afterEach(function () {
@@ -699,6 +706,8 @@ describe('DOT:', function () {
699706
nonce: nonce,
700707
freeBalance: 0,
701708
});
709+
const getFeeCB = sandBox.stub(Dot.prototype, 'getFee' as keyof Dot);
710+
getFeeCB.resolves(15783812856);
702711
});
703712

704713
afterEach(function () {

modules/sdk-coin-kaspa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
]
4141
},
4242
"dependencies": {
43-
"@bitgo/sdk-core": "^36.40.0",
43+
"@bitgo/sdk-core": "^36.41.0",
4444
"@bitgo/secp256k1": "^1.11.0",
45-
"@bitgo/statics": "^58.35.0",
45+
"@bitgo/statics": "^58.36.0",
4646
"bignumber.js": "9.0.0",
4747
"blakejs": "^1.2.1"
4848
},

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3365,7 +3365,7 @@ export const allCoinsAndTokens = [
33653365
'Canton Coin',
33663366
Networks.main.canton,
33673367
UnderlyingAsset.CANTON,
3368-
CANTON_FEATURES,
3368+
[...CANTON_FEATURES, CoinFeature.UNSPENT_MODEL],
33693369
KeyCurve.Ed25519
33703370
),
33713371
canton(

0 commit comments

Comments
 (0)