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/primary currency fiat insufficient funds error #5777

Merged
merged 34 commits into from
Feb 17, 2023

Conversation

Fatxx
Copy link
Contributor

@Fatxx Fatxx commented Feb 17, 2023

Description

This PR adds the following changes to Amount screen:

  • Inserted amount is now validated correctly when Fiat is selected as primary currency in Settings;
  • It should now provide converted Fiat values to all tokens that have conversion rate available, not only for mainnet;
  • Improve safety while converting number to BN;
  • Fix inconsistent decimal cases between native tokens and ERC-20 tokens when converted to Fiat;

What to test

  • Case 1 - Insufficient funds fix

    • Switch to "Binance Smart Chain Mainet"
    • Switch to "Fiat" as primary currency under "Settings > General"
    • Go to Send view
    • Send a value under your balance, it should proceed.
  • Case 2 - Insufficient funds fix

    • Switch to "Binance Smart Chain Mainet"
    • Switch to "Fiat" as primary currency under "Settings > General"
    • Go to Send view
    • Send a value above your balance, it should error "Insufficient funds".
  • Case 3 - Convert FIAT value for tokens (non-ETH)

    • Switch to "Binance Smart Chain Mainet" (other networks can also be tested)
    • Switch to "Fiat" as primary currency under "Settings > General"
    • Go to send view
    • Insert FIAT value
    • It should show converted BNB value

Note: To validate correct conversion values please compare it with cryptocompare

Screenshot
Screen Shot 2022-12-28 at 16 10 09

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #3983

Fatxx and others added 30 commits March 30, 2022 20:40
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
@Fatxx Fatxx requested a review from a team as a code owner February 17, 2023 02:29
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@Fatxx Fatxx added QA Passed A successful QA run through has been done Mobile QA board labels Feb 17, 2023
@Fatxx Fatxx merged commit 1798d3e into main Feb 17, 2023
@Fatxx Fatxx deleted the fix/primary-currency-fiat-insufficient-funds-error-v2 branch February 17, 2023 11:50
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When primary currency is fiat, “Insufficient funds” warning/error message is shown
2 participants