diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index a860894442..61014459cc 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -788,14 +788,16 @@ public abstract class Trade implements Tradable, Model { } public void importMultisigHex() { - List multisigHexes = new ArrayList(); - if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex()); - if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex()); - if (getArbitrator().getUpdatedMultisigHex() != null) multisigHexes.add(getArbitrator().getUpdatedMultisigHex()); - if (!multisigHexes.isEmpty()) { - log.info("Importing multisig hex for {} {}", getClass().getSimpleName(), getId()); - getWallet().importMultisigHex(multisigHexes.toArray(new String[0])); - log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId()); + synchronized (walletLock) { + List multisigHexes = new ArrayList(); + if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex()); + if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex()); + if (getArbitrator().getUpdatedMultisigHex() != null) multisigHexes.add(getArbitrator().getUpdatedMultisigHex()); + if (!multisigHexes.isEmpty()) { + log.info("Importing multisig hex for {} {}", getClass().getSimpleName(), getId()); + getWallet().importMultisigHex(multisigHexes.toArray(new String[0])); + log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId()); + } } }