From 761ec0659f3c14fd0fc1f970d0df1481dcea01ed Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Sun, 27 Mar 2022 11:00:25 +0200 Subject: [PATCH] show error message if partial signatures do not match wallet on finalizing psbt --- .../sparrow/transaction/HeadersController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java index c38fb83a..e95a0329 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java @@ -951,8 +951,13 @@ public class HeadersController extends TransactionFormController implements Init private void finalizePSBT() { if(headersForm.getPsbt() != null && headersForm.getPsbt().isSigned() && !headersForm.getPsbt().isFinalized()) { - headersForm.getSigningWallet().finalise(headersForm.getPsbt()); - EventManager.get().post(new PSBTFinalizedEvent(headersForm.getPsbt())); + try { + headersForm.getSigningWallet().finalise(headersForm.getPsbt()); + EventManager.get().post(new PSBTFinalizedEvent(headersForm.getPsbt())); + } catch(IllegalArgumentException e) { + AppServices.showErrorDialog("Cannot finalize PSBT", e.getMessage()); + throw e; + } } }