Skip to content

Commit f09599f

Browse files
fix(sdk-api): type errors in old code
They are correctly detected with Typescript 5 Issue: BTC-1450
1 parent c81d0b1 commit f09599f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

modules/sdk-api/src/v1/wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2173,7 +2173,7 @@ Wallet.prototype.consolidateUnspents = function (params, callback) {
21732173
return consolidationTransactions;
21742174
});
21752175

2176-
return runNextConsolidation(this, target)
2176+
return runNextConsolidation()
21772177
.catch(function (err) {
21782178
if (err.message === 'Done') {
21792179
return;

modules/sdk-api/test/unit/v1/wallet.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ const TestBitGo = {
2323
TEST_WALLET1_PASSCODE: 'iVWeATjqLS1jJShrPpETti0b',
2424
};
2525
const originalFetchConstants = BitGoAPI.prototype.fetchConstants;
26-
BitGoAPI.prototype.fetchConstants = function () {
27-
// @ts-expect-error - no implicit this
26+
BitGoAPI.prototype.fetchConstants = function (this: any) {
2827
nock(this._baseUrl).get('/api/v1/client/constants').reply(200, { ttl: 3600, constants: {} });
2928

3029
// force client constants reload

modules/sdk-test/src/bitgo/lib/test_bitgo.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ export class TestBitGo {
582582
}
583583
};
584584

585-
BitGoAPI.prototype.fetchConstants = function () {
586-
// @ts-expect-error - no implicit this
585+
BitGoAPI.prototype.fetchConstants = function (this: any) {
587586
nock(this._baseUrl)
588587
.get('/api/v1/client/constants')
589588
.reply(200, {

0 commit comments

Comments
 (0)