fix(client): hide OpenDisputeForm when a dispute is already Open - #215
Closed
shinzoxD wants to merge 1 commit into
Closed
fix(client): hide OpenDisputeForm when a dispute is already Open#215shinzoxD wants to merge 1 commit into
shinzoxD wants to merge 1 commit into
Conversation
Call useDispute and replace the reason field and submit button with a short status message whenever status.tag is Open, so users are not prompted to sign a duplicate open_dispute that the contract will reject. Closes Cylo-Traders#188
2 tasks
Author
|
Closing as overlapping with #183 (@LamsOfJos), which already adds #188 (duplicate-open guard) should land on top of that form after #183 merges, not as a second copy of the component. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenDisputeFormno longer offers a second open-dispute action when the campaign already has an open dispute.The form now calls
useDispute(campaignId)and, whenstatus.tag === 'Open', replaces the reason field and submit button with a short status message so users are not asked to sign a duplicateopen_disputethat the contract will reject (campaign not disputable).Closes #188
Changes
OpenDisputeFormchecksuseDispute()and hides the form when a dispute is alreadyOpenCampaignDetailPageso the guard is reachable from the campaign UITests
client/src/components/campaign/__tests__/OpenDisputeForm.test.tsx: given a mocked open dispute, the form (reason field + submit) does not render and the explanatory message doesRepo-wide
npm run lintstill reports pre-existing Windowsprettier/prettierDelete ␍errors on untouched files (same asmasterwithcore.autocrlf=true). The new files lint clean.Payout wallet
GBVHELLD2JE235Y2NGTDT3MWI3T65ON6SY4N6FBHYVDAQ5FZC2CP5QXH