Fix bump function: round to lower when BigNumber stores float value before converting to ethers BigNumber
This commit is contained in:
parent
342c34b07a
commit
c3bfb381b7
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tornado/tornado-oracles",
|
"name": "@tornado/tornado-oracles",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Gas oracle for Tornado-specific transactions",
|
"description": "Gas oracle for Tornado-specific transactions",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
@ -25,6 +25,7 @@ export function bump(value: BigNumberish, percent: number): BigNumber {
|
|||||||
BigNumberFloat(BigNumber.from(value).toHexString())
|
BigNumberFloat(BigNumber.from(value).toHexString())
|
||||||
.times(hundredPercents.plus(BigNumberFloat(percent)))
|
.times(hundredPercents.plus(BigNumberFloat(percent)))
|
||||||
.div(hundredPercents)
|
.div(hundredPercents)
|
||||||
|
.decimalPlaces(0, 1)
|
||||||
.toString(),
|
.toString(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user