From 5c4fa7a53f7a66783d4f4a499fac740ef73b8a19 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 25 Oct 2024 11:34:07 -0400 Subject: [PATCH] import multisig hex if needed on create payout tx --- core/src/main/java/haveno/core/trade/Trade.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index f63fcc96..72f84a50 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -1064,6 +1064,14 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model { } } + public void importMultisigHexIfNeeded() { + synchronized (walletLock) { + if (wallet.isMultisigImportNeeded()) { + importMultisigHex(); + } + } + } + public void importMultisigHex() { synchronized (walletLock) { synchronized (HavenoUtils.getDaemonLock()) { // lock on daemon because import calls full refresh @@ -1184,6 +1192,11 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model { // create payout tx synchronized (walletLock) { synchronized (HavenoUtils.getWalletFunctionLock()) { + + // import multisig hex if needed + importMultisigHexIfNeeded(); + + // create payout tx for (int i = 0; i < TradeProtocol.MAX_ATTEMPTS; i++) { MoneroRpcConnection sourceConnection = xmrConnectionService.getConnection(); try {