Skip to content

Commit afb7f7e

Browse files
committed
fix: fix signPsbt
1 parent 9af175e commit afb7f7e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/background/controller/provider/controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ class ProviderController extends BaseController {
181181
req.data.params.psbtHex = formatPsbtHex(psbtHex);
182182
}])
183183
signPsbt = async ({ data: { params: { psbtHex, options } }, approvalRes }) => {
184-
if (approvalRes.psbtHex) {
185-
return approvalRes.psbtHex
184+
if (approvalRes?.signedPsbtHex) {
185+
return approvalRes.signedPsbtHex
186186
}
187187
const networkType = wallet.getNetworkType()
188188
const psbtNetwork = toPsbtNetwork(networkType)

src/ui/pages/Approval/components/SignPsbt/index.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,14 @@ export default function SignPsbt({
588588

589589
if (!handleConfirm) {
590590
handleConfirm = (res) => {
591-
resolveApproval({
592-
psbtHex: (res ?? txInfo).psbtHex
593-
});
591+
if (res) {
592+
resolveApproval({
593+
// signed by hardware wallet
594+
signedPsbtHex: res.psbtHex
595+
});
596+
} else {
597+
resolveApproval();
598+
}
594599
};
595600
}
596601

0 commit comments

Comments
 (0)