From ef5da116459e2fd90849ed48889cdaf575f03fa2 Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Fri, 27 Oct 2023 13:30:45 +0200 Subject: [PATCH] fix(sdk-core): use BuildParams.encode when consolidating unspents Issue: BTC-576 --- modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts b/modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts index 86239a9ce6..f2929d7495 100644 --- a/modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts +++ b/modules/sdk-core/src/bitgo/pendingApproval/pendingApproval.ts @@ -17,6 +17,7 @@ import { } from '../pendingApproval'; import { RequestTracer, TssUtils } from '../utils'; import { IWallet } from '../wallet'; +import { BuildParams } from '../wallet/BuildParams'; export class PendingApproval implements IPendingApproval { private readonly bitgo: BitGoBase; @@ -337,7 +338,7 @@ export class PendingApproval implements IPendingApproval { // it needs to be rebuilt using the special consolidation build route prebuildParams.prebuildTx = await this.bitgo .post(this.wallet.url(`/consolidateUnspents`)) - .send(prebuildParams) + .send(BuildParams.encode(prebuildParams)) .result(); delete prebuildParams.recipients; }