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

Error when Metamask is locked #30

Open
montsamu opened this issue Dec 13, 2017 · 0 comments
Open

Error when Metamask is locked #30

montsamu opened this issue Dec 13, 2017 · 0 comments

Comments

@montsamu
Copy link

In latest git code (not live web) receive several errors when attempting to view the dev fund with a locked Metamask, resulting in a blank page. The first of these is:

×
←→1 of 3 errors on the page
Error: Please pass numbers as strings or BigNumber objects to avoid precision errors.
fromWei
C:/cygwin/home/samont/Projects/site/node_modules/web3-utils/src/index.js:194
CreatorPage.render
C:/cygwin/home/samont/Projects/site/src/CreatorPage.js:225
222 | const sunsetPeriodDays = Math.floor((this.state.contract.sunsetPeriod % 31536000) / 86400);
223 | const withdrawalPeriodDays = Math.floor((this.state.contract.withdrawalPeriod % 31536000) / 86400);
224 |
> 225 | const balance = web3.utils.fromWei(this.state.contract.balance, 'ether');
226 |
227 | let withdrawalAmount = this.state.exchangeRate * (balance * 0.1);
228 | withdrawalAmount = withdrawalAmount.toFixed(2);

Even when I changed to use String(this.state.contract.balance) there was a later error, which led me to figure out that my Metamask was locked.

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

No branches or pull requests

1 participant