Skip to content

Commit

Permalink
Merge pull request #48 from helix-bridge/xiaoch05-fix-withdraw
Browse files Browse the repository at this point in the history
bugfix: withdraw liquidity
  • Loading branch information
xiaoch05 authored Nov 22, 2024
2 parents 8106c1b + 112566b commit b0eb6d0
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 b0eb6d0

Please sign in to comment.