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

Bugfix: cancel and speedup insufficient funds #1252

Merged
merged 6 commits into from
Jan 6, 2020

Conversation

estebanmino
Copy link
Contributor

Description

Instead of showing an alert I blocked the button to do a cancel / speed up as you can see here
https://recordit.co/uPCGfIzRqW

Once address book pr we can use the same error component here

Checklist

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

Issue

Resolves #1208

@estebanmino estebanmino added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Dec 17, 2019
Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

LGTM!

const { accounts } = this.props;
const checksummedFrom = safeToChecksumAddress(tx.transaction.from);
const balance = accounts[checksummedFrom].balance;
return hexToBN(balance).lt(
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to wrap this in a try & catch and return true(?) on the catch.
The reason is that there are several values involved (gas, tx value, rate, gas price) and those come from different sources, if one of those requests fail, the whole thing will fail too, and I'd prefer in that case to fail later rather than prohibiting everyone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

totally

@ibrahimtaveras00
Copy link
Contributor

The disabled cta works good 👍

However, when I sanity checked speeding up txn's when I have plenty of funds, I get a possible unhandled promise rejection seen here = http://recordit.co/e1x3fXNeTI

Screen Shot 2019-12-17 at 5 52 27 PM

@estebanmino
Copy link
Contributor Author

fixed #1252 (comment) . on gaba

Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

Fix looks good on both OS's, QA passed 👍

@estebanmino estebanmino merged commit 5ac4f71 into develop Jan 6, 2020
@estebanmino estebanmino deleted the bugfix/cancel-and-speedup-insufficient-funds branch January 6, 2020 21:13
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* alert message

* snaps

* fix

* bump gaba

* try catch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show an alert when user has insufficient funds to speed up a transaction
3 participants