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

Improve dispute views #4446

Merged

Conversation

chimp1984
Copy link
Contributor

@chimp1984 chimp1984 commented Aug 28, 2020

Add re-open dispute button to mediation views (not refund agent as
there it might be dangerous if he would close 2 times and pay out twice.

If a dispute was reopened and a message was sent afterwards the receiver
will auto-reopen the dispute as well and the UI shows the number
indicator.

Add search field to traders dispute views.

Fix DisputeMsgEvents which was handling only legacy arbitration cases
and now uses mediation and refund agent. Used to update state in case
the UI is not selected.

Add "send private notification" button for mediators and refund agents.

Add report button for mediators and refund agents
Generates report text of all disputes with more detailed information
which should be used for reporting.

Add "Dump text of all disputes" button for getting a text representation
of all disputes including the messages for mediators and refund agents.
This is not used for report but might be useful for search, etc.

Do not show legacy arbitration tabs (for traders as well for
arbitrators) if no cases available.

Add 5 new enum entries for Reason for dispute:
OPTION_TRADE
SELLER_NOT_RESPONDING
WRONG_SENDER_ACCOUNT,
TRADE_ALREADY_SETTLED,
PEER_WAS_LATE

Hide NO_REPLY, SCAM and PROTOCOL_VIOLATION in UI (still in code if we still
need it and re-activate them).

For testing there are several scenarios:

  • mediator reopens and send message (reopen alone does not trigger anything on peers), traders should get it reopened as well
  • trader reopens and send message -> mediator get it reopened as well
  • reopening need to be visible by updated number indicator
  • test with user has mediation screen activated, has other screen activated, is offline. In all cases the number indicator need to be correct and once the mediation screen is opened the dispute opened.
  • if the payout distribution is different at second close the new distribution should be show at both traders. If they have the popup open it will not be updated, but at close/open it will be updated.

Important note to mediators:
Try to avoid to change the payout distribution as there is a case where that would lead to a failed trade. If one user has already accepted the earlier payout distribution and the other user accept the updated one an exception is thrown. It would be more effort to support that as well so I left that out.
If both users accept the new distribution all goes well, but the mediator cannot know that.

sqrrm and others added 2 commits August 26, 2020 13:40
When a dispute is reopened it now shows the chat text entry field.
Add report button:
Generates report text of all disputes with more detailed information
which should be used for reporting.

Add "Dump text of all disputes" button for getting a text representation
of all disputes including the messages. This is not used for report but
might be useful for search, etc.

Do not show legacy arbitration tabs (for traders as well for
arbitrators) if no cases available.

Add 3 new enum entries for Reason for dispute:
OPTION_TRADE
SELLER_NOT_RESPONDING
WRONG_SENDER_ACCOUNT
Hide NO_REPLY and PROTOCOL_VIOLATION in UI (still in code if we still
need it and re-activate them)
@chimp1984
Copy link
Contributor Author

Examples for reports:

Dispute nr. 1
Opening date: 28 Aug 2020 10:51:04
Close date: 28 Aug 2020 12:56:37
Dispute duration: 2 hours, 5 minutes
Payment method: Altcoins
Currency: BSQ (BSQ)
Trade amount: 0.001 BTC
Buyer/seller security deposit: 0.006 BTC/0.006 BTC
Dispute opened by: Buyer as maker
Payout to buyer/seller (winner): 0.0055 BTC/0.0075 BTC (Seller)
Reason: OPTION_TRADE
Summary notes: other test msg
Summary notes (different message to other trader was used): test message

Dispute nr. 2
Opening date: 28 Aug 2020 10:51:08
Close date: 28 Aug 2020 10:59:01
Dispute duration: 0 hours, 7 minutes
Payment method: Altcoins
Currency: BSQ (BSQ)
Trade amount: 0.001 BTC
Buyer/seller security deposit: 0.006 BTC/0.006 BTC
Dispute opened by: Buyer as maker
Payout to buyer/seller (winner): 0.007 BTC/0.006 BTC (Buyer)
Reason: BUG
Summary notes: dummy result....

Summary of reasons for disputes:
OPTION_TRADE: 1
BUG: 1

Add re-open dispute button to mediation views (not refund agent as
there it might be dangerous if he would close 2 times and pay out twice.

If a dispute was reopened and a message was sent afterwards the receiver
will auto-reopen the dispute as well and the UI shows the number
indicator.

Add search field to traders dispute views.

Fix DisputeMsgEvents which was handling only legacy arbitration cases
and now uses mediation and refund agent. Used to update state in case
the UI is not selected.

Add "send private notification" button for mediators and refund agents.

Add report button for mediators and refund agents
Generates report text of all disputes with more detailed information
which should be used for reporting.

Add "Dump text of all disputes" button for getting a text representation
of all disputes including the messages for mediators and refund agents.
This is not used for report but might be useful for search, etc.

Do not show legacy arbitration tabs (for traders as well for
arbitrators) if no cases available.

Add 5 new enum entries for Reason for dispute:
OPTION_TRADE
SELLER_NOT_RESPONDING
WRONG_SENDER_ACCOUNT,
TRADE_ALREADY_SETTLED,
PEER_WAS_LATE

Hide NO_REPLY, SCAM and PROTOCOL_VIOLATION in UI (still in code if we still
need it and re-activate them).
OPTION_TRADE,
SELLER_NOT_RESPONDING,
WRONG_SENDER_ACCOUNT,
TRADE_ALREADY_SETTLED,
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, the TRADE_ALREADY_SETTLED is badly needed

@wiz
Copy link
Contributor

wiz commented Aug 29, 2020

It would be cool feature to have in the list of mediator tickets, to check block explorer API and display red or green depending if deposit TXID is spent or unspent. For example you can view the red or green arrows in this TX to see if UTXO has been spent or not https://mempool.space/bisq/tx/4b5417ec5ab6112bedf539c3b4f5a806ed539542d8b717e1c4470aa3180edce5

Copy link
Contributor

@wiz wiz left a comment

Choose a reason for hiding this comment

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

ACK

Screen Shot 2020-08-29 at 17 32 09

Screen Shot 2020-08-29 at 17 31 56

Dispute nr. 215
Opening date: Aug 28, 2020 5:11:44 AM
Close date: Aug 29, 2020 5:32:02 PM
Dispute duration: 1 day, 12 hours, 20 minutes
Payment method: US Postal Money Order
Currency: US Dollar (USD)
Dispute opened by: Buyer as maker
Reason: PEER_WAS_LATE
Summary notes: Parties completed trade normally

@wiz
Copy link
Contributor

wiz commented Aug 29, 2020

The only additional change I would request is to make the report for a given cycle, i.e. give me a report for cycle 16, since it's hard to filter it all out by hand in text editor

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@sqrrm sqrrm merged commit 79a26aa into bisq-network:master Aug 29, 2020
@chimp1984
Copy link
Contributor Author

@wiz
Re cycle: Yes will make another PR for that.
Re deposit TXID is spent or unspent: i will look into it.

Will add a bit more in a new PR as well, like preparing for case when RA resigns (mediator signs result summary, RA can close without payout,...)

@sqrrm
Copy link
Member

sqrrm commented Aug 29, 2020

@chimp1984 I propose that you make separate PRs for separate issues to make it easier to review. This PR was pretty hard to review even though it was conceptually pretty simple.

@chimp1984
Copy link
Contributor Author

@sqrrm Yes I agree.

@chimp1984 chimp1984 deleted the add-report-button-for-dispute-views branch August 29, 2020 16:33
@ripcurlx ripcurlx added this to the v1.3.8 milestone Aug 29, 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.

4 participants