Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid that buyer switches back to trade step 2 at startup after payment confirmed #4885

Conversation

chimp1984
Copy link
Contributor

Fixes #4864

When seller if offline we resend the CounterCurrencyTransferStartedMessage at startup.
That caused the trade state set to BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG and then after
the msg was stored in mailbox to BUYER_STORED_IN_MAILBOX_FIAT_PAYMENT_INITIATED_MSG.
Those 2 msg trigger diff. UI states which led to the UI glitch that the UI moved to
step 2 and then to step 3 which was correct but confusing to the user.

Now we only apply BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG is trade state ordinal is
smaller avoiding that UI glitch.

This is not a critical bug fix so open to maintainers to add it to 1.5.1. But I think its also very low risk and easy to review and test.

When seller if offline we resend the CounterCurrencyTransferStartedMessage at startup.
That caused the trade state set to BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG and then after
the msg was stored in mailbox to BUYER_STORED_IN_MAILBOX_FIAT_PAYMENT_INITIATED_MSG.
Those 2 msg trigger diff. UI states which led to the UI glitch that the UI moved to
step 2 and then to step 3 which was correct but confusing to the user.

Now we only apply BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG is trade state ordinal is
smaller avoiding that UI glitch.
@chimp1984
Copy link
Contributor Author

How to test it?

  • Create a trade and close seller after take offer.
  • Create a new block, buyer gets to step 2
  • Buyer confirms payment sent. Msg is stored in mailbox, buyer is at step 3
  • Restart buyer and leave screen at open trades. You will see at start that it starts with step2, sends the msg again and then goes to step 3. This automatic switch from step 2 to step 3 is confusing to users and this PR fixes that.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Fixes the problem for me on Regtest

@ripcurlx ripcurlx merged commit 588623e into bisq-network:hotfix/v1.5.1 Dec 4, 2020
@chimp1984 chimp1984 deleted the fix-bug-with-reapplying-past-trade-state branch December 4, 2020 16:32
@ripcurlx ripcurlx added this to the 1.5.1 milestone Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants