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

Check funds before popup metamask #4742

Merged
merged 5 commits into from
Jul 17, 2019
Merged

Check funds before popup metamask #4742

merged 5 commits into from
Jul 17, 2019

Conversation

octavioamu
Copy link
Contributor

Description

Add a balance checker before pops metamask to avoid people paying fees and then get stuck for the next payment.
Also it add featured to the math to check if the funder have enough funds.
Removes loading button state when fail to let the funder make changes and resubmit
https://embed.vidyard.com/share/FQJZYZDoX8q8wFgwMuBQSA?

Refers/Fixes

Fix #4618

Testing

Tested in rinkeby and mainnet (without completing the TX)
Tested with variations of using coupons with normal and 0 fees
Tested with featured bounties activated/deactivated
Tested with ETH and DAI

@codecov
Copy link

codecov bot commented Jul 5, 2019

Codecov Report

Merging #4742 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4742   +/-   ##
=======================================
  Coverage   30.44%   30.44%           
=======================================
  Files         216      216           
  Lines       17255    17255           
  Branches     2340     2340           
=======================================
  Hits         5254     5254           
  Misses      11793    11793           
  Partials      208      208

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac1401f...8f754de. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 5, 2019

Codecov Report

Merging #4742 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4742   +/-   ##
=======================================
  Coverage   30.41%   30.41%           
=======================================
  Files         216      216           
  Lines       17240    17240           
  Branches     2335     2335           
=======================================
  Hits         5244     5244           
  Misses      11788    11788           
  Partials      208      208

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d1662c...bd50854. Read the comment docs.

@octavioamu octavioamu requested a review from a team July 5, 2019 06:12
@frankchen07
Copy link
Contributor

frankchen07 commented Jul 8, 2019

cool, maybe in v2 we can increase the number of sig figs in the decimal amount (since it said you have 0.4 ETH but need 0.4 ETH (technically 0.4011 or something).

either way, the point is to warn them about amount, so this LGTM.

@danlipert danlipert requested a review from thelostone-mc as a code owner July 9, 2019 13:02
@danlipert
Copy link
Contributor

@octavioamu I merged master into this branch and some random tests started failing :( not sure why

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.

Metamask requests fee payment when funds aren't available
4 participants