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.
Description
An issue was raised (#3765) where motion related transactions were not opening the correct action when clicked. After investigating the issue, it turned out that most transactions were not opening the correct action, and in fact were not even opening the correct colony. This PR aims to refactor the way clicking on a transaction in the user hub works, and introduces a new 'associatedActionId' property on the transaction type. This will hold the action id (which is itself a transaction hash) of the action which should be opened. If it is not present, it can be assumed that the transaction hash contained in the transaction itself is the correct one.
This PR fixes the following navigation bugs when a transaction is clicked:
Testing
Theoretically, every transaction type can be tested, so if you really really want to spend two days testing this then feel free to just trigger every possible type of transaction method listed here:
src/types/transactions.ts
and make sure when clicking them in the user hub that you navigate where you would expect!In reality of course, you probably don't want to do that, so here's some good places to test. Feel free to test either all of them or just some of them:
Screen.Recording.2024-12-24.at.11.17.01.mov
Screen.Recording.2024-12-24.at.11.20.21.mov
In my video some other motion related bugs are shown, but you can ignore these (claiming twice at the end, seeing a flash of the change vote button, and seeing oppose wins for a second even though the motion passed)
Screen.Recording.2024-12-24.at.11.31.20.mov
Screen.Recording.2024-12-24.at.11.39.54.mov
Screen.Recording.2024-12-24.at.11.50.18.mov
If you can think of any other transactions to test, feel free! Some other things which I haven't mentioned are cancelling transactions, and doing actions using permissions for example.
Diffs
New stuff ✨
associatedActionId
on the transaction modelChanges 🏗
Resolves #3765