close multisig wallet after seller prepares payment received message

This commit is contained in:
woodser 2022-05-05 08:48:44 -04:00
parent c08ee2298d
commit ded73cad6c
2 changed files with 3 additions and 2 deletions

View File

@ -51,6 +51,8 @@ public class SellerPreparesPaymentReceivedMessage extends TradeTask {
trade.getSeller().setPayoutTxHex(payoutTx.getTxSet().getMultisigTxHex());
}
// close multisig wallet
processModel.getProvider().getXmrWalletService().closeMultisigWallet(trade.getId());
complete();
} catch (Throwable t) {
failed(t);

View File

@ -25,7 +25,6 @@ import bisq.core.trade.Trade;
import bisq.core.trade.messages.PaymentSentMessage;
import bisq.core.trade.protocol.tasks.TradeTask;
import bisq.core.util.Validator;
import java.util.Arrays;
import lombok.extern.slf4j.Slf4j;
import monero.wallet.MoneroWallet;
@ -51,7 +50,7 @@ public class SellerProcessesPaymentSentMessage extends TradeTask {
// sync and update multisig wallet
if (trade.getBuyer().getUpdatedMultisigHex() != null) {
XmrWalletService walletService = processModel.getProvider().getXmrWalletService();
MoneroWallet multisigWallet = walletService.getMultisigWallet(trade.getId()); // TODO: ensure sync() always called before importMultisigHex()
MoneroWallet multisigWallet = walletService.getMultisigWallet(trade.getId()); // TODO: ensure sync() always called before importMultisigHex()
multisigWallet.importMultisigHex(trade.getBuyer().getUpdatedMultisigHex());
walletService.closeMultisigWallet(trade.getId());
}