Git Product home page Git Product logo

Comments (8)

honestbonsai avatar honestbonsai commented on May 27, 2024 1

@adrianmcli Will do.

from drizzle-legacy.

dangell7 avatar dangell7 commented on May 27, 2024

Did you fix this?

from drizzle-legacy.

GarethOates avatar GarethOates commented on May 27, 2024

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.

OnlyOneJMJQ avatar OnlyOneJMJQ commented on May 27, 2024

Will attempt to reproduce on our end.

from drizzle-legacy.

honestbonsai avatar honestbonsai commented on May 27, 2024

I can reproduce on drizzle-box. This happens under the following scenario:

Metamask 5.3.0
drizzle-box v1.0.0

  1. Login to Metamask using account 1.
  2. Switch to account 2.
  3. Observe the error Uncaught Error: Please pass numbers as strings or BigNumber objects to avoid precision errors

from drizzle-legacy.

honestbonsai avatar honestbonsai commented on May 27, 2024

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.

adrianmcli avatar adrianmcli commented on May 27, 2024

@honestbonsai can you bump and publish drizzle-react-components and then update the box so we can close this issue?

from drizzle-legacy.

cds-amal avatar cds-amal commented on May 27, 2024

Closing this out due to inactivity and @honestbonsai fixes in DRC and drizzle-box. Please reopen if necessary.

from drizzle-legacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.