mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 00:07:49 +00:00
remove timeout confirming payment sent/received & revert state on error
This commit is contained in:
parent
0ead6d8f83
commit
5c0d9a1ae5
2 changed files with 6 additions and 4 deletions
|
@ -140,9 +140,10 @@ public class BuyerProtocol extends DisputeProtocol {
|
|||
handleTaskRunnerSuccess(event);
|
||||
},
|
||||
(errorMessage) -> {
|
||||
log.warn("Error confirming payment sent, reverting state to {}, error={}", Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN, errorMessage);
|
||||
trade.setState(Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
||||
handleTaskRunnerFault(event, errorMessage);
|
||||
}))
|
||||
.withTimeout(TradeProtocol.TRADE_TIMEOUT_SECONDS))
|
||||
})))
|
||||
.run(() -> trade.advanceState(Trade.State.BUYER_CONFIRMED_PAYMENT_SENT))
|
||||
.executeTasks(true);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -136,9 +136,10 @@ public class SellerProtocol extends DisputeProtocol {
|
|||
handleTaskRunnerSuccess(event);
|
||||
resultHandler.handleResult();
|
||||
}, (errorMessage) -> {
|
||||
log.warn("Error confirming payment received, reverting state to {}, error={}", Trade.State.BUYER_SENT_PAYMENT_SENT_MSG, errorMessage);
|
||||
trade.setState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
||||
handleTaskRunnerFault(event, errorMessage);
|
||||
}))
|
||||
.withTimeout(TradeProtocol.TRADE_TIMEOUT_SECONDS))
|
||||
})))
|
||||
.run(() -> trade.advanceState(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT))
|
||||
.executeTasks(true);
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in a new issue