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

bump positions query persister version #6239

Merged

Conversation

greg-schrammel
Copy link
Contributor

Fixes APP-####

What changed (plus any additional context for devs)

when removing moxie locked positions from the total wallet balance I introduced a new positions.totals.totalLocked that the useWalletBalances subtract from the total, when the user has old persisted data this prop does not exist while it's refetching/reparsing the positions, making it try to subtract undefined and returning NaN

instead of bumping the persister version (which may cause the user to have the wrong balance, without any positions value, for a couple seconds while it refetches it for the first time after this change is released)
we could do like positions.totals.totalLocked || '0' defensive style but I think in this case I like to have and keep the type contract, not a strong opinion tho

Screen recordings / screenshots

What to test

Copy link

linear bot commented Oct 26, 2024

@brunobar79
Copy link
Member

Launch in simulator or device for 12317a0

Copy link
Contributor

@walmat walmat left a comment

Choose a reason for hiding this comment

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

I don't fully understand the reason for this happening, but fix makes sense to my shallow knowledge.

@greg-schrammel greg-schrammel merged commit a52797c into develop Oct 31, 2024
8 checks passed
@greg-schrammel greg-schrammel deleted the gregs/app-1971-nan-while-loading-wallet-balance branch October 31, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants