Skip to content

Commit

Permalink
fix: Unisat integration signPsbt functionality [ENG-5091]
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkirov committed Nov 11, 2024
1 parent 86c43fa commit b105fa3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/adapters/unisat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down

0 comments on commit b105fa3

Please sign in to comment.