Skip to content

Commit

Permalink
bugfix: withdraw liquidity
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Nov 22, 2024
1 parent 8106c1b commit 112566b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/relayer/relayer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ import { SafeService } from "../base/safe-service/safe.service";
import { gasPriceToString } from "../base/provider";

const kMaxWithdrawTransferCount = 16;
export const kMaxWithdrawTransferAmount: bigint = BigInt(
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
);
export const kMaxWithdrawTransferAmount: number = Number.MAX_VALUE;

export class ChainInfo {
chainName: string;
Expand Down Expand Up @@ -920,13 +918,11 @@ export class RelayerService implements OnModuleInit {
}
let amountThreshold = kMaxWithdrawTransferAmount;
if (lnProvider.withdrawLiquidityAmountThreshold) {
amountThreshold = BigInt(
lnProvider.withdrawLiquidityAmountThreshold
);
amountThreshold = lnProvider.withdrawLiquidityAmountThreshold
}
if (
filterTransferIds.length >= countThreshold ||
totalAmount >= amountThreshold
Number(totalAmount) / Number(new Any(1, srcDecimals).Number) >= amountThreshold
) {
// token transfer direction fromChain -> toChain
// withdrawLiquidity message direction toChain -> fromChain
Expand Down

0 comments on commit 112566b

Please sign in to comment.