Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: invalid decimal size (argument="decimals", value=0.001, code=INVALID_ARGUMENT, version=bignumber/... #1256

Closed
sentry-io bot opened this issue Aug 18, 2023 · 1 comment · Fixed by #1400 · May be fixed by #1320
Closed

Error: invalid decimal size (argument="decimals", value=0.001, code=INVALID_ARGUMENT, version=bignumber/... #1256

sentry-io bot opened this issue Aug 18, 2023 · 1 comment · Fixed by #1400 · May be fixed by #1320

Comments

@sentry-io
Copy link

sentry-io bot commented Aug 18, 2023

Sentry Issue: SCORE-API-1P

Error: invalid decimal size (argument="decimals", value=0.001, code=INVALID_ARGUMENT, version=bignumber/5.7.0)
  File "/workspace/node_modules/@ethersproject/logger/lib/index.js", line 238, in Logger.makeError
    var error = new Error(message);
  File "/workspace/node_modules/@ethersproject/logger/lib/index.js", line 247, in Logger.throwError
    throw this.makeError(message, code, params);
  File "/workspace/node_modules/@ethersproject/logger/lib/index.js", line 250, in Logger.throwArgumentError
    return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {
  File "/workspace/node_modules/@ethersproject/bignumber/lib/fixednumber.js", line 35, in getMultiplier
    return logger.throwArgumentError("invalid decimal size", "decimals", decimals);
  File "/workspace/node_modules/@ethersproject/bignumber/lib/fixednumber.js", line 41, in formatFixed
    var multiplier = getMultiplier(decimals);
...
(5 additional frame(s) were not displayed)
@wa0x6e
Copy link
Contributor

wa0x6e commented Aug 18, 2023

Issue arise when using erc-balance-of strategy, by passing a decimal number (< 1) to the decimal option. This unit is in WEI, and 18 decimals = 1 ETH, and not the other way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant