From b105fa313a834e9439f612ea9e3a6aa48cf47351 Mon Sep 17 00:00:00 2001 From: Victor Kirov Date: Mon, 11 Nov 2024 14:30:12 +0200 Subject: [PATCH] fix: Unisat integration signPsbt functionality [ENG-5091] --- src/adapters/unisat.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/adapters/unisat.ts b/src/adapters/unisat.ts index 2b3cc14..728dd87 100644 --- a/src/adapters/unisat.ts +++ b/src/adapters/unisat.ts @@ -135,15 +135,16 @@ class UnisatAdapter extends SatsConnectAdapter { autoFinalized: broadcast, toSignInputs: convertSignInputsToInputType(signInputs), }); + const signedPsbtBase64 = Buffer.from(signedPsbt, 'hex').toString('base64'); + + let txid: string | undefined; if (broadcast) { - const txid = await window.unisat.pushPsbt(psbtHex); - return { - psbt: signedPsbt, - txid, - }; + txid = await window.unisat.pushPsbt(signedPsbt); } + return { - psbt: psbtHex, + psbt: signedPsbtBase64, + txid, }; }