Skip to content

Commit

Permalink
fix: compare with lowercase router addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
just-a-node committed Apr 24, 2024
1 parent b44430c commit 2cb1822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/agents/sdk/src/sdkUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ export class SdkUtils extends SdkShared {
order: { orderBy: "balance", ascOrDesc: "desc" },
limit: _maxN
});

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

0 comments on commit 2cb1822

Please sign in to comment.