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

feat: add demo mode indicator and exit functionality #6465

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

kathaypacific
Copy link
Collaborator

@kathaypacific kathaypacific commented Jan 31, 2025

Description

As the title, this PR adds:

  • chip indicator on tab navigator headers
  • confirmation bottom sheet
  • dispatch toggle false action and conditional navigation to onboarding when confirmed

Test plan

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-01-31.at.17.15.57.mp4

Related issues

Backwards compatibility

Y

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

@@ -63,6 +64,7 @@ export function* watchRefreshBalances() {
createFiatConnectTransferCompleted.type,
depositTransactionSucceeded.type,
swapSuccess.type,
Web3Actions.DEMO_MODE_TOGGLED,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

seems sensible to refresh the balances when the demo mode is toggled. the balances sagas are terminating early if there is no address anyway

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.06%. Comparing base (a733bde) to head (b2edd26).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #6465    +/-   ##
========================================
  Coverage   89.05%   89.06%            
========================================
  Files         730      731     +1     
  Lines       31895    31922    +27     
  Branches     5792     6107   +315     
========================================
+ Hits        28405    28431    +26     
+ Misses       3443     3294   -149     
- Partials       47      197   +150     
Files with missing lines Coverage Δ
src/components/TokenBalance.tsx 97.65% <ø> (ø)
src/home/saga.ts 55.35% <100.00%> (+0.81%) ⬆️
src/navigator/DemoModeChipIndicator.tsx 100.00% <100.00%> (ø)
src/navigator/Headers.tsx 62.06% <100.00%> (+0.44%) ⬆️

... and 70 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a733bde...b2edd26. Read the comment docs.

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.

1 participant