ethereumjs / ethereumjs-units

Ethereum unit conversion.
MIT License
43 stars 19 forks source link

Make it work without bignumber libraries #3

Open axic opened 8 years ago

axic commented 8 years ago

Add more zeroes or move the decimal dot in the string.

Thanks to @wanderer for the idea.

juliomatcom commented 6 years ago

Hello, Yes also about using bignumber.js you can't build react native with this dependency:

[exp] The package at "./node_modules/bignumber.js/bignumber.js" attempted to import the Node standard library module "crypto". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo

Thank you,

SilentCicero commented 6 years ago

Use a precompiled and bundled version, it will work fine.

Alternately, use ethjs-unit, the dist is included in the repo.

https://github.com/ethjs/ethjs-unit

Sent from my iPhone

On Oct 22, 2017, at 8:56 AM, J.C. Martin notifications@github.com wrote:

Hello, Yes also about using bignumber.js you can't build react native with this dependencies:

[exp] The package at "./node_modules/bignumber.js/bignumber.js" attempted to import the Node standard library module "crypto". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo

Thank you,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.