From 12df43db7c43f8dd99c451a83408d8226633f5de Mon Sep 17 00:00:00 2001 From: Luis Covarrubias Date: Wed, 27 Nov 2024 12:20:34 -0800 Subject: [PATCH] fix: handle signPsbtRequest with Bluebird Fixes the `callback is not a function` error Ticket: BTC-1351 TICKET: BTC-1351 --- modules/sdk-api/src/v1/wallet.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/sdk-api/src/v1/wallet.ts b/modules/sdk-api/src/v1/wallet.ts index cd45fd90aa..e215bcf1d1 100644 --- a/modules/sdk-api/src/v1/wallet.ts +++ b/modules/sdk-api/src/v1/wallet.ts @@ -899,11 +899,7 @@ Wallet.prototype.signTransaction = function (params, callback) { params = _.extend({}, params); if (params.psbt) { - try { - return callback(null, signPsbtRequest(params)); - } catch (e) { - return callback(e); - } + return Bluebird.try(() => signPsbtRequest(params)).nodeify(callback); } common.validateParams(params, ['transactionHex'], [], callback);