-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Webpack minification causing BigNumber arguments to be filtered #1356
Comments
Here's a bash script to hack around this:
|
I also ran into this issue. I think it would be best to rewrite the way the The latest version of BigNumber.js sets the field I think it would be good to update that package so that it also offers a As a (temporary?) solution I stopped mangling of the
which seems to work. |
I thought I submitted a bug for this in version 0.2.x. Easiest work-around is to always use web3's version of BigNumber by doing: Some takeaways from this bug that has wasted so much of everyone's time:
|
@beether The problem with the above solution, which is otherwise somewhat elegant, is that you can't configure the BigNumber class. For example: // By default BigNumber's `toString` method converts to exponential notation if the value has
// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
BigNumber.config({
EXPONENTIAL_AT: 1000,
}); Moreover, my codebase might not have access to web3 everywhere I might want to use BigNumber, and solutions to that particular problem can also become messy. |
This should be solved within the next release. (PR #2000) |
Issue
Running into
Invalid number of arguments to Solidity function
when callingzeroEx.token.setUnlimitedProxyAllowanceAsync(address, account)
.Environment
1.0.0-beta.21
and 0x.js is using version0.20.4
.Notes
isBigNumber
(https://github.com/ethereum/web3.js/blob/develop/lib/utils/utils.js#L489) doesn't recognize the amount 0x.js sends as aBigNumber
.The text was updated successfully, but these errors were encountered: