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

Subtract hidden assets from wallet balance #6205

Merged
merged 27 commits into from
Nov 2, 2024

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Oct 15, 2024

Fixes APP-1939
Fixes APP-1940
Fixes #6079

Parent issue
Fixes APP-1938

What changed (plus any additional context for devs)

Reading through the commits is probably a good way to understand what has changed, but essentially

  1. migrates hidden tokens to Zustand userAssetsStore stored per wallet address
  2. adds a new hook useWalletsHiddenBalances.ts which subscribes to the Zustand store and updates those balance when an asset hidden state changes or when an asset price changes.
  3. Factors in the balance (minus hidden assets balance) where we expose wallet balances
    • wallet screen
    • change wallet sheet
    • dapp browser control panel

Screen recordings / screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-16.at.13.16.09.mp4

What to test

Migrate accounts with previously hidden tokens and make sure they remain hidden
Test hiding new assets, unhiding old assets, etc.

Copy link

linear bot commented Oct 15, 2024

@walmat walmat marked this pull request as ready for review October 16, 2024 01:37
@brunobar79
Copy link
Member

Launch in simulator or device for 150cfb9

@walmat walmat changed the title [pt 1/2] - migrate hidden assets to zustand Subtract hidden assets from wallet balance Oct 16, 2024
@brunobar79
Copy link
Member

Launch in simulator or device for 5cf03db

src/state/assets/userAssets.ts Outdated Show resolved Hide resolved
src/hooks/useWalletsHiddenBalances.ts Outdated Show resolved Hide resolved
src/hooks/useWalletsHiddenBalances.ts Outdated Show resolved Hide resolved
src/hooks/useWalletsHiddenBalances.ts Outdated Show resolved Hide resolved
src/hooks/useWalletsHiddenBalances.ts Outdated Show resolved Hide resolved
@walmat walmat requested a review from benisgold October 16, 2024 19:00
@brunobar79
Copy link
Member

Launch in simulator or device for 5f3cd16

@brunobar79
Copy link
Member

Launch in simulator or device for 8c9ae53

@walmat walmat requested review from greg-schrammel and derHowie and removed request for christianbaroni and estebanmino October 24, 2024 23:43
@brunobar79
Copy link
Member

Launch in simulator or device for ea19c7b

@walmat walmat requested a review from greg-schrammel October 31, 2024 13:43
@brunobar79
Copy link
Member

Launch in simulator or device for 4ecf42b

@brunobar79
Copy link
Member

Launch in simulator or device for 50eace9

@walmat walmat merged commit f5b7c14 into develop Nov 2, 2024
7 of 8 checks passed
@walmat walmat deleted the @matthew/migrate-hidden-coins-to-zustand branch November 2, 2024 00:14
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.

Hidden tokens are still counted in the total wallet balance
4 participants