only import multisig hex on dispute closed if wallet exists after sync

This commit is contained in:
woodser 2023-03-01 13:14:53 -05:00
parent ed0f458bc4
commit 1809e34aaa

View File

@ -251,16 +251,18 @@ public final class ArbitrationManager extends DisputeManager<ArbitrationDisputeL
}
dispute.setDisputeResult(disputeResult);
// import multisig hex
if (disputeClosedMessage.getUpdatedMultisigHex() != null) trade.getArbitrator().setUpdatedMultisigHex(disputeClosedMessage.getUpdatedMultisigHex());
trade.importMultisigHex();
// sync and save wallet
if (!trade.isPayoutPublished()) {
trade.syncWallet();
trade.saveWallet();
}
// import multisig hex
if (trade.walletExists()) {
if (disputeClosedMessage.getUpdatedMultisigHex() != null) trade.getArbitrator().setUpdatedMultisigHex(disputeClosedMessage.getUpdatedMultisigHex());
trade.importMultisigHex();
}
// attempt to sign and publish dispute payout tx if given and not already published
if (disputeClosedMessage.getUnsignedPayoutTxHex() != null && !trade.isPayoutPublished()) {