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(wallet)_: Disable send button on router errors & visually indicate gas issues #15867

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

belalshehab
Copy link
Contributor

@belalshehab belalshehab commented Jul 29, 2024

What does the PR do

This PR fixes a bug in the wallet's transaction flow where the send button was not disabled when the router encountered router errors, leading to failed transactions. It also adds a visual indicator (red arrow) for networks that lack sufficient gas for a transaction, providing more helpful feedback to users.

Closes #15700 #15701

Affected areas

  • SendModal.qml
  • NetworkCardsComponent.qml

StatusQ checklist

  • add documentation if necessary (new component, new feature)
  • update sandbox app
    • in case of new component, add new component page
    • in case of new features, add variation to existing component page
    • nice to have: add it to the demo application as well
  • test changes in both light and dark theme?

Screenshot of functionality (including design for comparison)

image
  • I've checked the design and this PR matches it

Impact on end user

  • Users will no longer be able to initiate a transaction when the router detects errors, preventing failed transactions and potential loss of funds.
  • Users will receive clearer feedback about why a network is unsuitable for a transaction (e.g., insufficient gas), leading to a better overall user experience.

How to test

  1. make sure to test on account that have balances:
    mainnet Eth = 0 and usdc (or any other crypto money other than Eth) = 10
    optimism Eth > 0.1 and usdc = 10
  2. try to send 12 usdc (any amount that is greater than 10 and less than 20
  3. observe the send button not showing up
  4. navigate to the advanced tab and see which network doesn't have enough gas

Risk

Described potential risks and worst case scenarios.

Tick one:

  • Low risk: 2 devs MUST perform testing as specified above and attach their results as comments to this PR before merging.
  • High risk: QA team MUST perform additional testing in the specified affected areas before merging.

…e gas issues

 * Disable the send button when the router returns errors.
 * Display a red arrow on networks lacking sufficient gas for the transaction.

Closes #15700 #15701
@status-im-auto
Copy link
Member

status-im-auto commented Jul 29, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ cf113f4 #1 2024-07-29 16:10:05 ~6 min tests/nim 📄log
✔️ cf113f4 #1 2024-07-29 16:14:14 ~10 min macos/aarch64 🍎dmg
✔️ cf113f4 #1 2024-07-29 16:14:36 ~10 min macos/x86_64 🍎dmg
✔️ cf113f4 #1 2024-07-29 16:17:39 ~13 min tests/ui 📄log
✔️ cf113f4 #1 2024-07-29 16:18:42 ~14 min linux-nix/x86_64 📦tgz
✔️ cf113f4 #1 2024-07-29 16:20:32 ~16 min linux/x86_64 📦tgz
✔️ cf113f4 #1 2024-07-29 16:33:04 ~29 min windows/x86_64 💿exe

@belalshehab belalshehab merged commit 955c8f6 into master Jul 30, 2024
9 checks passed
@belalshehab belalshehab deleted the fix/ui-handle-router-errors branch July 30, 2024 15:33
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.

Suggestion is present even there is no gas
4 participants