Comments (8)
@adrianmcli Will do.
from drizzle-legacy.
Did you fix this?
from drizzle-legacy.
Think this needs a bit more clarification. The error is happening because somewhere the code is passing a value into the web3.utils.fromWei function as a number type instead of a String or BigNumber. Are you using the fromWei function in your own client-side code at all?
from drizzle-legacy.
Will attempt to reproduce on our end.
from drizzle-legacy.
I can reproduce on drizzle-box
. This happens under the following scenario:
Metamask 5.3.0
drizzle-box v1.0.0
- Login to Metamask using account 1.
- Switch to account 2.
- Observe the error
Uncaught Error: Please pass numbers as strings or BigNumber objects to avoid precision errors
from drizzle-legacy.
For drizzle-box, I've narrowed down the issue to https://github.com/trufflesuite/drizzle-react-components/blob/master/src/AccountData.js#L36.
The issue with the code is that balance
becomes undefined at some point during the account switch. I think a simple check for that should fix it if you have implemented your own version of AccountData. I'll open an issue + PR over on the drizzle-react-components
repo.
I don't believe this is an issue with Drizzle itself, so I'll be closing this.
@terencechow Can you provide us with a sample of your code?
Or confirm that checking for undefined
balance will fix your issue? If not, please let us know and we can look into this some more. Thanks.
from drizzle-legacy.
@honestbonsai can you bump and publish drizzle-react-components
and then update the box so we can close this issue?
from drizzle-legacy.
Closing this out due to inactivity and @honestbonsai fixes in DRC and drizzle-box. Please reopen if necessary.
from drizzle-legacy.
Related Issues (20)
- Drizzle cache does not clear error message HOT 3
- Allow empty drizzleOptions HOT 1
- Better error message for invalid event name HOT 3
- incorrect from address when switching account with Metamask HOT 2
- Potential error in polling
- cacheCall() sometimes hangs. Needs a browser restart to fix. HOT 4
- Calling function with multiple return values HOT 2
- npm install with app directory fails for Drizzle HOT 1
- print revert() in new Contract function HOT 1
- Support for meta transactions HOT 4
- H
- H
- Question: Can I generateStore() with extra initialState? HOT 2
- drizzle installation Error HOT 5
- Support for Typescript HOT 3
- Fallback issue with infura ws HOT 2
- Calling cacheCall on a contract method which returns a struct gives an error - Web3 related HOT 3
- If user denies access through MetaMask (6.6.0+) drizzle does not fail gracefully HOT 2
- ..
- Failed to compile. Module not found: Can't resolve 'drizzle' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drizzle-legacy.