Skip to content

Commit

Permalink
fix: already filtering by domain and asset
Browse files Browse the repository at this point in the history
  • Loading branch information
just-a-node committed May 23, 2024
1 parent 80584f1 commit 6adfaaa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/agents/sdk/src/sdkUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,8 @@ export class SdkUtils extends SdkShared {

let totalLiquidity = BigNumber.from(0);
for (let routerBalance of routersByLargestBalance) {
if (routerBalance.domain == domainId && routerBalance.local.toLowerCase() == _asset) {
const balanceBN = BigNumber.from(this.scientificToBigInt(routerBalance.balance.toString()));
totalLiquidity = totalLiquidity.add(balanceBN);
}
const balanceBN = BigNumber.from(this.scientificToBigInt(routerBalance.balance.toString()));
totalLiquidity = totalLiquidity.add(balanceBN);
}

const totalLiquidityWithBuffer = _minLiquidityBN.mul(BigNumber.from(100 + _bufferPercentage)).div(100);
Expand Down

0 comments on commit 6adfaaa

Please sign in to comment.