Skip to content

Commit

Permalink
Merge pull request #257 from balancer-labs/hotfix/4.0.0-beta.6
Browse files Browse the repository at this point in the history
Hotfix/4.0.0 beta.6
  • Loading branch information
John Grant authored May 16, 2022
2 parents 1ccdd85 + e8f66df commit 0dd1dbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/sor",
"version": "4.0.0-beta.5",
"version": "4.0.0-beta.6",
"license": "GPL-3.0-only",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
10 changes: 8 additions & 2 deletions src/pools/linearPool/linearPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,10 @@ export class LinearPool implements PoolBase {
poolPairData: LinearPoolPairData,
amount: OldBigNumber
): OldBigNumber {
const bigintAmount = parseFixed(amount.toString(), 18).toBigInt();
const bigintAmount = parseFixed(
amount.dp(18).toString(),
18
).toBigInt();
const mainBalance = poolPairData.mainBalanceScaled.toBigInt();
const wrappedBalance = poolPairData.wrappedBalanceScaled.toBigInt();
const bptSupply = poolPairData.virtualBptSupply.toBigInt();
Expand Down Expand Up @@ -835,7 +838,10 @@ export class LinearPool implements PoolBase {
poolPairData: LinearPoolPairData,
amount: OldBigNumber
): OldBigNumber {
const bigintAmount = parseFixed(amount.toString(), 18).toBigInt();
const bigintAmount = parseFixed(
amount.dp(18).toString(),
18
).toBigInt();
const mainBalance = poolPairData.mainBalanceScaled.toBigInt();
const wrappedBalance = poolPairData.wrappedBalanceScaled.toBigInt();
const bptSupply = poolPairData.virtualBptSupply.toBigInt();
Expand Down

0 comments on commit 0dd1dbc

Please sign in to comment.