Skip to content

Commit 12df43d

Browse files
committed
fix: handle signPsbtRequest with Bluebird
Fixes the `callback is not a function` error Ticket: BTC-1351 TICKET: BTC-1351
1 parent 575a6b7 commit 12df43d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,7 @@ Wallet.prototype.signTransaction = function (params, callback) {
899899
params = _.extend({}, params);
900900

901901
if (params.psbt) {
902-
try {
903-
return callback(null, signPsbtRequest(params));
904-
} catch (e) {
905-
return callback(e);
906-
}
902+
return Bluebird.try(() => signPsbtRequest(params)).nodeify(callback);
907903
}
908904

909905
common.validateParams(params, ['transactionHex'], [], callback);

0 commit comments

Comments
 (0)