Skip to content

Error when Metamask is locked #30

@montsamu

Description

@montsamu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions