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(send): add new enter amount screen #4370

Merged
merged 8 commits into from
Oct 25, 2023
Merged

feat(send): add new enter amount screen #4370

merged 8 commits into from
Oct 25, 2023

Conversation

satish-ravi
Copy link
Contributor

Description

Adds new enter amount screen for multichain sends. Also

  • refactors assets screen and selectors to re-use getting tokens with balances and zero balance tokens.
  • adds a new state to send to track last sent tokenId, which will be the default token on the enter amount screen
  • removes lastUsedCurrency and associated actions and reducers which was not used anywhere

Test plan

Unit tests, manual

ios-send-enter-amount.mp4

Related issues

Backwards compatibility

Yes

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #4370 (0e4ff7d) into main (a1f9c33) will increase coverage by 0.02%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4370      +/-   ##
==========================================
+ Coverage   84.76%   84.79%   +0.02%     
==========================================
  Files         691      692       +1     
  Lines       25403    25490      +87     
  Branches     3357     3369      +12     
==========================================
+ Hits        21534    21615      +81     
- Misses       3808     3814       +6     
  Partials       61       61              
Files Coverage Δ
src/navigator/Screens.tsx 100.00% <100.00%> (ø)
src/redux/migrations.ts 96.75% <100.00%> (+0.01%) ⬆️
src/redux/store.ts 78.33% <ø> (ø)
src/send/Send.tsx 94.16% <100.00%> (ø)
src/send/SendAmount/useTransactionCallbacks.ts 95.89% <100.00%> (+0.11%) ⬆️
src/send/reducers.ts 48.48% <ø> (+1.26%) ⬆️
src/send/selectors.ts 95.83% <100.00%> (ø)
src/styles/fonts.tsx 100.00% <ø> (ø)
src/tokens/Assets.tsx 88.00% <100.00%> (-0.32%) ⬇️
test/schemas.ts 87.78% <100.00%> (+0.05%) ⬆️
... and 2 more

... and 1 file 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 a1f9c33...0e4ff7d. Read the comment docs.

<Text style={styles.title}>{t('sendEnterAmountScreen.title')}</Text>
<View style={styles.inputContainer}>
<View style={styles.inputRow}>
<TextInput
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is largely copied from src/swap/SwapAmountInput.tsx. We could make this DRY by making a wrapper TextInput component, but we'd need a bunch of style overrides so wasn't sure if it was worth it.

src/send/SendEnterAmount.test.tsx Outdated Show resolved Hide resolved
src/tokens/selectors.ts Show resolved Hide resolved
src/send/SendEnterAmount.tsx Outdated Show resolved Hide resolved
@satish-ravi satish-ravi enabled auto-merge (squash) October 25, 2023 19:36
@satish-ravi satish-ravi merged commit c2d3642 into main Oct 25, 2023
@satish-ravi satish-ravi deleted the satish/act-941 branch October 25, 2023 19:55
satish-ravi added a commit that referenced this pull request Nov 6, 2023
### Description

Addressing a todo from #4370 to complete the last used token id feature

### Test plan

Manually by doing a send and checking that the token defaults to the
last sent token on the new send amount screen and also checked the redux
state on flipper

### Related issues

- na

### Backwards compatibility

Yes
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