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

fix: rewards fee race condition #1628

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

euharrison
Copy link
Collaborator

When loading the interface directly on http://localhost:5173/staking/claim-rewards or if you is too fast clicking on the 'Claim' button, the native token asset is not found and the gas is not used as displayAmount, so there is an error

The solution was to add chainAssetsMap on the queryKey plus changing the type of chainTokensQuery to Record<Address, Asset | undefined> with the undefined piece, so we can map similar cases better

Screen.Recording.2025-02-11.at.17.25.46.mov

@euharrison euharrison requested review from pedrorezende and mateuszjasiuk and removed request for pedrorezende February 12, 2025 16:16
Copy link
Collaborator

@mateuszjasiuk mateuszjasiuk left a comment

Choose a reason for hiding this comment

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

LGTM!

@euharrison euharrison merged commit 6c8e26b into main Feb 13, 2025
7 checks passed
@euharrison euharrison deleted the fix/rewards-fee-race-condition branch February 13, 2025 13:29
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.

2 participants