-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feat/15886093 reputation cancel #3322
base: master
Are you sure you want to change the base?
Conversation
c0099a8
to
c60c833
Compare
@CzarekDryl looks like it needs another rebase on |
87e902e
to
f782dda
Compare
@jakubcolony @arrenv Branch rebased and ready to review |
4113c5c
to
255d868
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CzarekDryl Thank you for the work on this, and your patience. I have noticed a couple of things.
-
This translation error appeared when the Advanced payment was created.
-
Two cancelled pills appeared, there should be only one pill in the timeline.
-
The staking decision method does not trigger the transaction to create the payment.
-
Cancelling with Reputation after the Funding step resulted in the following, you should still be able to cancel after funding and the cancel pill should appear after the funding step.
255d868
to
b0a6149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start of this, I'm able to get through the entire flow.
![Screenshot 2024-11-14 at 11 22 45](https://private-user-images.githubusercontent.com/34915414/386173375-9854c5f1-0b31-4445-b3e9-9d6281eb0b75.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8zNDkxNTQxNC8zODYxNzMzNzUtOTg1NGM1ZjEtMGIzMS00NDQ1LWIzZTktOWQ2MjgxZWIwYjc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA1NDIzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzYzI0MDkzZjkxOWQ5NGU4MDZhNWE3ZmJhNDhhMGU0NzZlMzNmOGUwNzZhNTBlZWY3Y2ZjOTVmYmYwODI4YjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N0sXg2TIRM28LzWzPNTywQBsEMKx6CMtExkhCOheV7k)
There is an issue that if you reject the first motion and start another one, when the cancel step reappears it loads into the first motion rather than the staking stage of the second one, so it looks like it is in a broken state.
![Screenshot 2024-11-14 at 11 21 23](https://private-user-images.githubusercontent.com/34915414/386173710-342c37c8-7cdd-4448-ac60-de8c8fc277b5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8zNDkxNTQxNC8zODYxNzM3MTAtMzQyYzM3YzgtN2NkZC00NDQ4LWFjNjAtZGU4YzhmYzI3N2I1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA1NDIzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNjYjkxYWRkMjY1ZGRiZGNlMTY2MTY0ZGRmZGQwZTZiZDJiZjc3NzJhNjc2ODEyOGE2YmVhZGZhOTZlNTQ1YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-bl64btxQcV2NMmjpTSLAELO0Ozifp_JWsOWv-dfDgg)
And I'm experiencing the same issue as Arren when attempting to cancel after the funding stage.
![Screenshot 2024-11-14 at 11 23 59](https://private-user-images.githubusercontent.com/34915414/386173893-fef7031b-26a1-4f32-8613-9b5794c3c0d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8zNDkxNTQxNC8zODYxNzM4OTMtZmVmNzAzMWItMjZhMS00ZjMyLTg2MTMtOWI1Nzk0YzNjMGQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA1NDIzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0ZmFiMTExZTI5OTM4OGM4MzRmMzU5MjhlOGJlZjY1ZjIwMzcyNWE4YmZmZTliZGJmOGNkNGYzNTg3MzJlY2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MmbGt1HFS5QxL4hEm862HaZI_JYyKQY1cjmZxe6T3g0)
It also seemed odd that the cancel motion step completely disappears if you reject the motion, I think you should still be able to access the failed motions and the step should remain visible, especially if there are unclaimed stakes / rewards.
957a3a5
to
d01637e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CzarekDryl Thank you for your hard work on this. I noticed a few things while testing:
-
Canceling with Permissions after the Review stage resulted in the first incomplete action timeline, and if after funding, the second screenshot.
-
Can these have a hover state when there are multiple cancellation requests:
-
In this case I created a motion to cancel the action, then while voting I used Permissions to cancel it right away. It cancelled correctly but stayed in this view. Is it possible to remove all the following steps in the timeline and show a message in this case. Something like this Figma link.
-
It seems if there are any still running motions then the extra steps in the timeline persists, despite a motion already passing and being finalized and the action being cancelled. It should remove all steps if the action has been cancelled.
-
Claiming staked tokens shows this broken pending button, however, is it possible to auto return this stakes when cancelling?
-
Cancelling with permissions with no penalty showed this timeline, it should have the step label be "Cancel", as the stakes have already be returned, the text should be "The action was canceled and cannot be executed."
Figma link showing expected designs
- While testing, I noticed that we a missing the indicator as to whether the cancellation motion is penalising or not, can we add a pill to a motion item like this design? Figma link.
@arrenv Everything should be fixed now, please check it again. Penalty badge added to cancel request item. ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this PR @CzarekDryl, generally most of the functionality is there, but I spotted a few issues.
There appears to be regression around how cancel in review step is displayed:
![image](https://private-user-images.githubusercontent.com/112586815/394921231-7adff648-f59b-4196-aca9-da691e1c7d7b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTIxMjMxLTdhZGZmNjQ4LWY1OWItNDE5Ni1hY2E5LWRhNjkxZTFjN2Q3Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNjlmZWMzMTZjZmNhOGI4MWZiODUyZjY1NjgwYzA3ZmRhM2Y3NjMyNjAyZGJlYWEwNjdkZDY1MmQxOTk3MWZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QFFnwShZGvLlyy2eBV00KOeRONM43qaSk83dSFcxFWo)
The note in the Cancel modal should display the actual role held by the user instead of hardcoded Payer:
I was able to get into a broken state by quickly funding or releasing a payment while the funding motion was loading. The UI should be disabled during that period:
Screen.Recording.2024-12-11.at.23.02.55.mov
When cancelling a staked expenditure with penalise option, the modal gets stuck in Pending. There are errors in the console which are most likely due to the fact the UI is trying to reclaim stake (which has been forfeited) - I commented on where I think it happens in code.
![image](https://private-user-images.githubusercontent.com/112586815/394949598-56c6f442-9495-4619-ba34-80bd1ff92a52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTQ5NTk4LTU2YzZmNDQyLTk0OTUtNDYxOS1iYTM0LTgwYmQxZmY5MmE1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOTk3NjEwMDk3ZGIwMDVlYmQ3ZDRmNzQ3YzNlYTBkZjM5YWNjNWMwN2JmY2Y5NjZlZDM1ZjU3ZDMxNjhiMjJhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.g9XOL-MWP71tSsoa6C1vSA2AKHu2yUseQbohpcOb2g0)
The same thing happens with cancelling via motions, on motion finalization.
Penalise badge has a border that is not in the designs:
- Figma
![image](https://private-user-images.githubusercontent.com/112586815/394950662-85382567-4274-42a4-9090-9f64e0eeae54.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTUwNjYyLTg1MzgyNTY3LTQyNzQtNDJhNC05MDkwLTlmNjRlMGVlYWU1NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lN2E3MDliNWIyNjBjYWI4OTcwZDA0NDNjZmZkODk3NzhkMzZkYzczNjI1YzU3YjY4N2ZiODBkMmU4YmUxYzkyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.7t1lQS9UiHYReBGJtMiOGQZZk-4V_AIMWqDqNTwCZ58)
![image](https://private-user-images.githubusercontent.com/112586815/394950754-bd87d91d-d920-47b6-97b8-e1a9d14fd723.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTUwNzU0LWJkODdkOTFkLWQ5MjAtNDdiNi05N2I4LWUxYTlkMTRmZDcyMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZjgwZmJiOWZhZjY3OGIyOWM4YmFlYzM5YWVhM2Y0NGIyYmFhMjkzMDNjMGY1N2E0NTU0Y2ZhNjhiNTBlMTNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9-Wj-yNna9AabAhz--gPnNO5q74P2nZFIbnsg4jEvbQ)
Other flows tested which mostly work well:
Cancelling via permissions, non-staked expenditure:
- At Funding:
![image](https://private-user-images.githubusercontent.com/112586815/394921647-35b90cc1-c310-4a78-8cf0-11c3c78c5557.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTIxNjQ3LTM1YjkwY2MxLWMzMTAtNGE3OC04Y2YwLTExYzNjNzhjNTU1Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZjFkZDFkYjc3YjM4ZWNkYTdmYWExZjNkMzI5MTRmMGZiOWJmN2M3ZTExMzc4NmQwOTI1OTBjMDdkZTRlODQyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.qF-YzNjBqcsYQNWn2iDicYuzUu1yoRttm7yot6PVHXc)
- At Release:
![image](https://private-user-images.githubusercontent.com/112586815/394922524-39c726b4-6797-40d1-a067-d9e822b22a96.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTIyNTI0LTM5YzcyNmI0LTY3OTctNDBkMS1hMDY3LWQ5ZTgyMmIyMmE5Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMGQzOGFlYzE3NWY5ZmQ3ZjIyN2VlNzU5YjgyYjRhZGU0Y2ExMDVjMTE5NmViZDU3OWY4ODhiNDhiMjA1MzJlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.X3NJqhVyNBGN7sAF3_wodgAmEZ8ceXjpMpMZD4jpFzA)
Cancelling via reputation, non-staked expenditure:
![image](https://private-user-images.githubusercontent.com/112586815/394946832-f647c175-ee5f-4265-a20d-3a288d3ee91e.png?jwt=eyJhbGciOiJI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hUhgq872So)
Cancelling via permissions, staked:
![image](https://private-user-images.githubusercontent.com/112586815/394949029-6e691344-29ec-4219-93b6-397952bb481b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTQ5MDI5LTZlNjkxMzQ0LTI5ZWMtNDIxOS05M2I2LTM5Nzk1MmJiNDgxYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02NzE1MzU0MDExZjE5YjRhODQzZTY5ZGFlOGIzZDNkOWNlMzhiYTYwNDY1MWNkNTgzYzM5MDU2NWVmNTk5NWU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BTEH7JT6rvBkAnBR1Zqeg2CTqRUQFnyQU9uaF0crTi4)
Cancelling via reputation, staked expenditure:
![image](https://private-user-images.githubusercontent.com/112586815/394950468-f20358e8-c590-4509-ae73-93d015131207.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTUwNDY4LWYyMDM1OGU4LWM1OTAt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zN2U1NjhjNTMzZGQ2ODgyMjQ2NmEyNTg0YzM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.lG5j0M2lQlVj-5kno4ZF6yd8CUEsRQDkk-t_JxSxXB4)
![image](https://private-user-images.githubusercontent.com/112586815/394951772-d355da1d-1506-4864-a186-6fdac53491bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvMzk0OTUxNzcyLWQzNTVkYTFkLTE1MDYtNDg2NC1hMTg2LTZmZGFjNTM0OTFiYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MjdiYzRhYjViNjk4NTJkOWIwZWM5NmU5YjY2NmUwZWRhMTQwODMzNjgyZjY1ZjBmZGJiMGJmOTk3OTBlYTMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.oc9iA9SO3uV8p8ZBvPRb3LVmYeMVpQwN22FC-s4gC2Y)
if (penalise) { | ||
await cancelStakedExpenditureViaMotion(stakedMotionPayload); | ||
} else { | ||
await cancelExpenditureViaMotion(motionPayload); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which saga to use should not depend on penalise
but rather on the expenditure type - if staked, cancelStakedExpenditureViaMotion
should always be used. You can pass the penalise
as shouldPunish
param to the saga.
} else if (penalise) { | ||
await cancelStakedExpenditure(stakedPayload); | ||
await reclaimExpenditureStake(reclaimPayload); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here, cancelStakedExpenditure
should always be used for staked expenditure regardless of penalise
value.
Also, if creator was penalised, they lost their stake, so there is nothing to claim.
@@ -0,0 +1,80 @@ | |||
import clsx from 'clsx'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to reuse code from similar components? Composition via props could be used for elements specific to this type of action, e.g. the penalise badges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakubcolony Can we do this in other issue and refactor all request items?
@jakubcolony Everything should be fixed, please check it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @CzarekDryl, it is looking and working really well.
I did still run into a couple of things, not sure if they should be tackled in this PR.
-
If created using staking, and when finalizing a cancelation or using permissions to cancel I received this transaction error in the console.
-
If cancelling with Permissions and penalising, or not, it does not show which option was selected in the card, where it has been added when you use Reputation.
-
I received this error in the console when trying to stake, despite having more then enough tokens to stake.
@arrenv I've added badge while using permissions and it's in finalize pill And I'm not able to replicate console errors: Screen.Recording.2024-12-17.at.13.44.48.movScreen.Recording.2024-12-13.at.14.47.47.mov |
I have just seen this @CzarekDryl, is this related to this PR? |
22e07b0
to
6263a83
Compare
@arrenv I've checked and all descriptions work fine for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving after a rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for another round of changes @CzarekDryl, mostly looking good but I'm still seeing some issues with staked expenditure.
When cancelling using permissions, the cards are different depending on whether the creator was punished or not.
If punished, no label is displayed informing of this:
If not punished, an extra Finalize step is added to the stepper:
![image](https://private-user-images.githubusercontent.com/112586815/397387221-5da32d85-acd2-4dd7-902d-10282a932330.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8xMTI1ODY4MTUvMzk3Mzg3MjIxLTVkYTMyZDg1LWFjZDItNGRkNy05MDJkLTEwMjgyYTkzMjMzMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MTZmYmRiYmM5ZmQ2Y2ViZDQ1MDE3Yzg1ZGU4NWU3NTRiMmYwNDZkYzgyNzQzNTNlNzhkZjU5OWE1YzVkN2NhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xe77D8KUfhKd3q6bvOh2V7eqB0hwIkfrlj0R4EGn9C4)
It appears that the UI is still trying to reclaim the stake even though the payment creator was penalised, leading to some errors in the console:
I am still able to click around the UI while the cancel modal is in pending state. That's how I got the "Paid" label as well as a cancellation request in progress:
![image](https://private-user-images.githubusercontent.com/112586815/397391146-67327cde-00d3-4cdc-87a8-59d77b186d2f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8xMTI1ODY4MTUvMzk3MzkxMTQ2LTY3MzI3Y2RlLTAwZDMtNGNkYy04N2E4LTU5ZDc3YjE4NmQyZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOWY3NGRlMmFjYmUzYTFjMmRmYjhmMTgxNWExYjhjZDYzNTMxYmM3ZjI1NDc0MDRjNDZmYjllYzg4OTIxZWJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.cKtQYlJE_oV2nfTqasb-EguOsL3kZOELduXfbc2ruas)
Otherwise, things are working well:
![image](https://private-user-images.githubusercontent.com/112586815/397380587-840fae70-06b0-448d-a871-08fa92deec2a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8xMTI1ODY4MTUvMzk3MzgwNTg3LTg0MGZhZTcwLTA2YjAtNDQ4ZC1hODcxLTA4ZmE5MmRlZWMyYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMGVlMzEyNzNiMzQ3OWMzNzg2ZTcxZGVmNDcxZWU2MDhjYWMzOTgxMDQyMzg0ZWU1NmRjNWJlOTNhYTA3ZjgyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.3ploy7KRKTc6N4NymcnnjYpp93nXeYcGqY5pNah0uNg)
![image](https://private-user-images.githubusercontent.com/112586815/397381051-4bec5258-4673-47a8-bbd7-2acdd22d7dbd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8xMTI1ODY4MTUvMzk3MzgxMDUxLTRiZWM1MjU4LTQ2NzMtNDdhOC1iYmQ3LTJhY2RkMjJkN2RiZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZjU2YjcyMjdhNmJmMTc5NDc5Yjg2OGEyYmVmNDFiZDc5YzhkNjc5ODIwMzJkYmE1MDQwMGIwMzc5OGQwMzhlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jblyihzp2ccfCT145LtN9krKuTVixAJh8e2GmAPsvoQ)
![image](https://private-user-images.githubusercontent.com/112586815/397383414-2d7adc47-80b8-4a9e-b592-412c023507dc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF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hd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYWI1MzQxODZiZWUyNTE1Y2RlOTU3NmIzNTU4NWY4N2FlZDFhMTJjMjVlZWE4MDdkNWJlN2E4NzFkMDliMTZkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZzptzqmP653y2G29YPCH8nGTBNGQAQ_9TjUbQYex8cI)
![image](https://private-user-images.githubusercontent.com/112586815/397389673-f8c9345c-6ddc-4db2-8fea-3cd48f83151e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTQsIm5iZiI6MTczOTE2NjE1NCwicGF0aCI6Ii8xMTI1ODY4MTUvMzk3Mzg5NjczLWY4YzkzNDVjLTZkZGMtNGRiMi04ZmVhLTNjZDQ4ZjgzMTUxZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZTRlYzNjNzkwY2FkMTE2Njk5NTg4N2YwMDE0MTUzODZiN2U0MWQ5ZDRhMzAwZjJiZDNiMWI5NzFiYjlhZGJiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9oyeHK2d0bxFO4OVebs8HIcV30SJu_SOWulr1fqno8Q)
6263a83
to
0b9ce27
Compare
@jakubcolony All fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CzarekDryl Thank you for the updates. Going through Jakub's issued raised, mostly look resolved from what I could tell, except for the extra Finalize step, with some additional issues.
-
I created an Advanced payment using Staking, I confirmed the details, then I cancelled and did not penalize using Permissions. The result was both a "Cancel" and a "Finalize" stepper. Which both had different information, one saying "Penalised", and the other saying "No penalty".
There should not be an extra Finalize step, the pill should only be "No penalty", the stake amount should be included in the cancel step along with the label "Cancelled" as opposed to "Created".
8747f5f
to
4eae349
Compare
@arrenv Now reclaim step is showing only when user is penalised: ![]() And here is version for not penalised: ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem far off, thanks for your continued work on this.
The note should not be shown when cancelling a payment made using permissions (non-staked):
![image](https://private-user-images.githubusercontent.com/112586815/405018928-1aa14602-5b86-4324-9525-be5ce5966572.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvNDA1MDE4OTI4LTFhYTE0NjAyLTViODYtNDMyNC05NTI1LWJlNWNlNTk2NjU3Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNWZkYTM5OWY1MTY2ZDUwY2NlNzY2NWVhMDI1M2M2YzU1YzZlM2Y3YzZlNGZhYzgzMDdlNDUzMGI5YWE5MjhhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6-Rgefa0FrGkDTLGkxojSBtTWRS6tHo9yxqhlwakH_M)
![image](https://private-user-images.githubusercontent.com/112586815/405018886-4f8a9728-0987-454d-a823-303370787b3b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvNDA1MDE4ODg2LTRmOGE5NzI4LTA5ODctNDU0ZC1hODIzLTMwMzM3MDc4N2IzYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMWY3ZTVkYjQxZDgyNmQzN2YyMjhjOWRmOWI0N2FkYjI5NTk0ZDdhMzRiMTVhYjAyYjVkNzUyZGI0NDQyZTVlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.uLcVLoBGi9It4DQ2vK7PWZEaGnx9I4obM2Zta30kLvg)
The spacing between labels in the action info box is inconsistent:
![image](https://private-user-images.githubusercontent.com/112586815/405021959-bd0c14f9-92e7-42ea-ae99-b89eebb1c6bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5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4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03OGI3MjhlYWUyMzVjNGY5ODk0Y2ZiNjk0NDQ4YjkwMTU5OGE1OTU0YTAxM2Y0MzM5ZDAzMmRmZjkyODA0ZWQ5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eGnAAXxlR1QaPPtb_xDSI-ku7iZNac_gBJP83ilH-X8)
![image](https://private-user-images.githubusercontent.com/112586815/405022098-ff41eacc-9d17-49ee-8d00-c46cab14f17f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvNDA1MDIyMDk4LWZmNDFlYWNjLTlkMTctNDllZS04ZDAwLWM0NmNhYjE0ZjE3Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZTQ3MDBlOTUzOTdiMDE3ZjA0MWU4OWUxNTBmZDhhZjZhNzVjNjljMmY0N2E4ZDMyOWFkMWI2YWIxZDc1NGE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Ob9I6xGJZShq_g5okZxVUo1TeUQKeOfmsLkG2BcacZA)
I think the finalize step should not be shown in both cases (penalised and not penalised) as all the details are already in the cancel step. But I'll let @arrenv confirm that.
Cancelling staked payment while in review should automatically reclaim the stake (this is implemented on the contracts level). However it seems like the wrong method is called by the cancel saga, because it wasn't provided with stakedExpenditureAddress
:
![image](https://private-user-images.githubusercontent.com/112586815/405024986-935b299d-d36f-40b6-b29d-4218135fdd47.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjY0NTUsIm5iZiI6MTczOTE2NjE1NSwicGF0aCI6Ii8xMTI1ODY4MTUvNDA1MDI0OTg2LTkzNWIyOTlkLWQzNmYtNDBiNi1iMjlkLTQyMTgxMzVmZGQ0Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNTQyMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNjYyNjllM2ZlN2M3ZmJjYjJlMjU5NmJlZWRkMWQ2MTk4YzY5NGU1OGVhYzc4OGQ5MTdjZDI0YjEzYzVhMDhkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.lSc2Tw9sOHzm9li4xKcs3SVhNv-xNL9wD2_eETCddjE)
@@ -124,14 +79,19 @@ const ActionWithPermissionsInfo: FC<ActionWithPermissionsInfoProps> = ({ | |||
</div> | |||
</> | |||
)} | |||
{additionlInfo && additionlInfo} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
@CzarekDryl & @jakubcolony, yes, when an action has been cancelled, then there should be no finalize step. The person who originally staked the advanced payment should receive their stake back when the action has been cancelled. The members who staked on the cancel motion, should still be able to claim their stakes back in the prior step within the cancel step, rather then there being an additional Finalize step. |
@jakubcolony Spacing between heading are different because of items height, between items they are the same. |
cb9b24a
to
c3455ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the previous issues have been resolved, there's just one problem I run into - when cancelling a staked payment with penalising creator, all the steps collapse and it's not possible to select any:
Screen.Recording.2025-01-26.at.22.11.49.mov
Please have a look at the failing Github check:
The note is no longer displayed when cancelling a non-staked payment ✅
Stake is reclaimed when cancelling a staked payment in review stage ✅
Screen.Recording.2025-01-26.at.21.55.32.mov
There is no extra step when cancelling a staked payment ✅
Nice work on this so far, let's get it over the line!
fix after rebase fix: translations, duplicated steps fix: cancel step fixes after rebase fix: auto claim, stepper Feat: Add willPunishExpenditureStaker field to colony motion feat: add penalty badge fix: pending buttons, penalise saga fix: types fix: permission badge fix: reclaim, badge fixes after rebase fixes after rebase fix: cancel and reclaim step fix: remove finalize step from cancel
01019e0
to
d6e8f88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge amount of work, so great job so far!
There are unfortunately a few issues though, some may be out of scope, but I'll list them here regardless.
All cancellation motions have a "No Penalty" pill, even when the "Penalty" option selected.
Screen.Recording.2025-02-05.at.10.07.182.mov
If you have an active funding motion when cancelling, the widget becomes unusable.
Screen.Recording.2025-02-05.at.10.05.04.mov
If you have an active funding motion, then attempt to cancel via reputation, the widget becomes unusable.
Screen.Recording.2025-02-05.at.10.14.46.mov
Similar issues with an active release motion.
Screen.Recording.2025-02-05.at.10.17.50.mov
Otherwise things are mostly working great, again there is a lot of good work here!
I've also left a few comments where translation strings have been missed.
The payment creator will keep their full stake and | ||
reputation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use a translation string.
The payment creator will lose their full stake and | ||
the relative amount of reputation. Penalised funds | ||
are burned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
||
const handleFundExpenditure = async () => { | ||
const handleFundExpenditure = async ({ decisionMethod, penalise }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleCancelExpenditure
?
onChange={onChange} | ||
hasError={!!error} | ||
> | ||
No, don't penalise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation string here.
onChange={onChange} | ||
hasError={!!error} | ||
> | ||
Yes, penalise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
</ul> | ||
{!!error && ( | ||
<p className="mt-1 text-sm text-negative-400"> | ||
A penalised option is required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is getting huge, if there is anything that can be done to separate it up that would help make it more readable. (Can be left for a later PR if not feasible now)
@@ -16,6 +17,6 @@ export interface PaymentBuilderWidgetProps { | |||
export interface FinalizeStepProps { | |||
expenditure: Expenditure | undefined | null; | |||
expectedStepKey: ExpenditureStep | null; | |||
expenditureStep: ExpenditureStep | null; | |||
expenditureStep: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ExpenditureStep
?
Description
This PR introduces options for penalizing or not penalizing the cancellation of staked payments. It also implements a reputation method for canceling after the locked state and the handling of multiple cancellation requests.
Testing
Main issue - #2256