mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
resend payment sent/received messages on startup if not arrived
This commit is contained in:
parent
21fcdc7e00
commit
5db80eac17
@ -54,11 +54,10 @@ public class BuyerProtocol extends DisputeProtocol {
|
||||
super.onInitialized();
|
||||
|
||||
// re-send payment sent message if not arrived
|
||||
if (trade.getState() == Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG || trade.getState() == Trade.State.BUYER_SEND_FAILED_PAYMENT_SENT_MSG) {
|
||||
synchronized (trade) {
|
||||
synchronized (trade) {
|
||||
if (trade.getState().ordinal() >= Trade.State.BUYER_CONFIRMED_IN_UI_PAYMENT_SENT.ordinal() && trade.getState().ordinal() <= Trade.State.BUYER_SEND_FAILED_PAYMENT_SENT_MSG.ordinal()) {
|
||||
latchTrade();
|
||||
given(anyPhase(Trade.Phase.PAYMENT_SENT)
|
||||
.anyState(Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG, Trade.State.BUYER_SEND_FAILED_PAYMENT_SENT_MSG)
|
||||
.with(BuyerEvent.STARTUP))
|
||||
.setup(tasks(
|
||||
BuyerSendPaymentSentMessageToSeller.class,
|
||||
|
@ -50,11 +50,10 @@ public class SellerProtocol extends DisputeProtocol {
|
||||
super.onInitialized();
|
||||
|
||||
// re-send payment received message if not arrived
|
||||
if (trade.getState() == Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG || trade.getState() == Trade.State.SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG) {
|
||||
synchronized (trade) {
|
||||
synchronized (trade) {
|
||||
if (trade.getState().ordinal() >= Trade.State.SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT.ordinal() && trade.getState().ordinal() <= Trade.State.SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG.ordinal()) {
|
||||
latchTrade();
|
||||
given(anyPhase(Trade.Phase.PAYMENT_RECEIVED)
|
||||
.anyState(Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG, Trade.State.SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG)
|
||||
.with(SellerEvent.STARTUP))
|
||||
.setup(tasks(
|
||||
SellerSendPaymentReceivedMessageToBuyer.class,
|
||||
|
Loading…
Reference in New Issue
Block a user