-
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
Get user transactions from database instead of redux state #2127
Conversation
def62f7
to
e3828c1
Compare
c1c1e6c
to
b5c10e2
Compare
831dcdd
to
c423c1a
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.
Great effort went into this PR, nice work @chmanie!
I spotted a potential regression when a tx fails:
- on
master
, it expands the error details:
Screen.Recording.2024-05-10.at.13.52.05.mov
- whereas on this branch it doesn't happen:
Screen.Recording.2024-05-10.at.13.55.52.mov
Thanks for the review @jakubcolony! I'll take care of it asap. |
cb7404e
to
3e6762f
Compare
@jakubcolony can you take another look maybe? Thank you! |
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 job Chris! Completed pill issue is resolved:
Screen.Recording.2024-07-29.at.09.25.48.mov
I have found one issue, but it might also exist on master.
I created a mint tokens action, but rejected the first transaction. I then retried it from the userhub, this time accepting the transaction, but the "Claim pending transactions" part never triggered. This left the "Pending 1/2" pill spinning forever, even after a refresh, and there is no way to retry it from the userhub.
![Screenshot 2024-07-29 at 09 28 53](https://private-user-images.githubusercontent.com/34915414/352974125-80b6fa80-ce5a-456e-8f87-3cad216f0508.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTgxNjYsIm5iZiI6MTczOTI1Nzg2NiwicGF0aCI6Ii8zNDkxNTQxNC8zNTI5NzQxMjUtODBiNmZhODAtY2U1YS00NTZlLThmODctM2NhZDIxNmYwNTA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MTEwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmNmZkMmMxNThkNGYwNDQ2YmZlYzQzODFlMzZjZTQwY2VmZTRiMzkzYmM1ZjVmMGFlODQzMWRhYmQyZTc3NDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.66IxKb5RL5BHNj0fCs6gRQUui1vtH30ExwSEUnGbYkE)
Just tested this on master - it does behave the same, except the "pending" pill disappears after a refresh. I think the change here to show the "pending" pill after a refresh makes sense as there are still pending transactions, but I wouldn't be surprised if we find more stuck "pending" pills in other areas of the app. |
Oh yeah that's definitely something that needs to be fixed but can't be in the current state. As a matter of fact, the transaction API refactor that I'm working on will fix this issue. |
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 Chris, everything is still looking good to me. Played around a little locally again to be sure and couldn't spot any regressions.
Let's go! 🎉
Description
Sorry for another big one :(
This PR moves the transaction state to Apollo, from redux. It does not remove sagas but it enables a path forward to refactor this gradually. All sagas should still work, except that the transaction state is read from the Apollo cache / the database as opposed to redux.
Redux as a whole also wasn't removed yet, as some of the sagas depend on other parts of the state, still (like gas prices estimation). This can be done in a follow-up PR.
Another thing that isn't in scope is the fix of the transactions list paging (didn't work before), for that I'm going to open yet another PR.
I used optimistic UI updates for the transaction updates so that changes should be reflected as fast as before.
Testing
Basically everything should work as before. Please create some transactions and/or bigger transaction groups to test this.
Diffs
Changes 🏗
Deletions ⚰️
Resolves #2171