widgets icon indicating copy to clipboard operation
widgets copied to clipboard

defaultOutputAmount does not handle floats

Open undfined opened this issue 3 years ago • 0 comments

Bug Description

TokenDefaults defaultOutputAmount does not handle float values and results in a runtime exception.

(also docs have incorrect property name defaultOutputTokenAmount)

Steps to Reproduce

  1. Pass a decimal value to defaultOutputAmount
  2. See runtime exception below:
Error: invalid BigNumber string (argument="value", value="0.83458456", code=INVALID_ARGUMENT, version=bignumber/5.6.0)

Expected Behavior Should be able to pass any real number as the default amount or prop should receive a BigNumber to avoid messing with floats at all.

undfined avatar May 05 '22 20:05 undfined