Use Numeric type for decimals parameter in FixedNumber.fromValue() #4141
Labels
enhancement
New feature or improvement.
fixed/complete
This Bug is fixed or Enhancement is complete and published.
minor-bump
Planned for the next minor version bump.
v6
Issues regarding v6
Describe the Feature
The current function signature of FixedNumber.fromValue() is as follows:
FixedNumber.fromValue(value: BigNumberish, decimals?: number, format?: FixedFormat) ⇒ FixedNumber)
The returning numeric values in ethers are
bigint
, as far as I know, also theNumeric
type in ethers is an union ofbigint
andnumber
types. For that reason I consider that is better to change the type of decimals parameter fromnumber
toNumeric
to allowbigint
type also, letting the function signature as follows.FixedNumber.fromValue(value: BigNumberish, decimals?: Numeric, format?: FixedFormat) ⇒ FixedNumber)
Code Example
The text was updated successfully, but these errors were encountered: