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(qr): land on send screen when scanning with 0 balance #5265

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

satish-ravi
Copy link
Contributor

@satish-ravi satish-ravi commented Apr 17, 2024

Description

send navigation was blocked on a canSendTokensSelector which uses a deprecated tokens selector that only checks celo tokens and returns true if the at least one celo network token has a balance > 0 and a local currency exchange rate is available. The new send flow can handle both these scenarios, and we want to navigate to the zero state send screen, so this check is removed

Test plan

Before After
qr-scan-zero-balance-before.mp4
qr-scan-zero-balance-after.mp4

Related issues

Backwards compatibility

Yes

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)

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 85.89%. Comparing base (e07c16b) to head (3ede2eb).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5265      +/-   ##
==========================================
- Coverage   85.91%   85.89%   -0.03%     
==========================================
  Files         745      745              
  Lines       30487    30484       -3     
  Branches     5288     5287       -1     
==========================================
- Hits        26192    26183       -9     
- Misses       4059     4065       +6     
  Partials      236      236              
Files Coverage Δ
src/send/utils.ts 93.10% <ø> (-0.45%) ⬇️
src/qrcode/QRScanner.tsx 36.58% <0.00%> (-0.92%) ⬇️

... and 2 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 e07c16b...3ede2eb. Read the comment docs.

@satish-ravi satish-ravi merged commit 7a43746 into main Apr 17, 2024
16 of 17 checks passed
@satish-ravi satish-ravi deleted the satish/act-1148 branch April 17, 2024 18:24
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
…#5265)

### Description

send navigation was blocked on a `canSendTokensSelector` which uses a
deprecated tokens selector that only checks celo tokens and returns true
if the at least one celo network token has a balance > 0 and a local
currency exchange rate is available. The new send flow can handle both
these scenarios, and we want to navigate to the zero state send screen,
so this check is removed

### Test plan

| Before | After |
|--------|--------|
| <video
src="https://github.com/valora-inc/wallet/assets/5062591/279b6b1e-e9ac-4974-832d-2b4c0612df69"
/> | <video
src="https://github.com/valora-inc/wallet/assets/5062591/625788c9-fd1b-48bc-9b30-e61afad1df40"
/> |


### Related issues

- Fixes ACT-1148

### Backwards compatibility

Yes

### Network scalability

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

- [x] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
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.

None yet

2 participants