You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
The shared BigNumber configuration in utils/src/bignumber_config.ts seems to configure whatever BigNumber is installed as a dependency for 0xproject/utils. Note that this is not necessarily the same BigNumber as the one used by the caller.
I recently ran into an issue where schema validation failed for API calls made by 0xproject/connect because the BigNumber used by connect wasn't configured correctly (Order salts were serialized in the exponential notation).
Running npm dedupe fixed the issue, so I'm inclined to believe that this was because the BigNumber that was configured by utils wasn't the same as the one used by connect.
Possible fixes:
Move bignumber from dependencies to peerDependencies in 0xproject/utils
Instead of having a bigNumberConfigs.configure method in utils, just configure and re-export BigNumber and import it from utils instead of bignumber.js in the other packages.
The shared BigNumber configuration in utils/src/bignumber_config.ts seems to configure whatever
BigNumber
is installed as a dependency for0xproject/utils
. Note that this is not necessarily the sameBigNumber
as the one used by the caller.I recently ran into an issue where schema validation failed for API calls made by
0xproject/connect
because theBigNumber
used byconnect
wasn't configured correctly (Order salts were serialized in the exponential notation).Running
npm dedupe
fixed the issue, so I'm inclined to believe that this was because theBigNumber
that was configured byutils
wasn't the same as the one used byconnect
.Possible fixes:
bignumber
fromdependencies
topeerDependencies
in0xproject/utils
bigNumberConfigs.configure
method inutils
, just configure and re-exportBigNumber
and import it fromutils
instead ofbignumber.js
in the other packages.Related to #293
The text was updated successfully, but these errors were encountered: