poll trade wallet on error importing multisig or processing payout

This commit is contained in:
woodser 2024-10-16 07:33:43 -04:00
parent 329fa1c39a
commit 74e094fa99

View file

@ -1080,6 +1080,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
handleWalletError(e, sourceConnection); handleWalletError(e, sourceConnection);
if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e; if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e;
HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying
doPollWallet();
} }
} }
} }
@ -1254,6 +1255,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
handleWalletError(e, sourceConnection); handleWalletError(e, sourceConnection);
if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e; if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e;
HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying
doPollWallet();
} }
} }
throw new RuntimeException("Failed to create payout tx for " + getClass().getSimpleName() + " " + getId()); throw new RuntimeException("Failed to create payout tx for " + getClass().getSimpleName() + " " + getId());
@ -1283,6 +1285,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
handleWalletError(e, sourceConnection); handleWalletError(e, sourceConnection);
if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e; if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e;
HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying
doPollWallet();
} finally { } finally {
requestSaveWallet(); requestSaveWallet();
requestPersistence(); requestPersistence();