From 112566bf82456c8952a7fe5f81d6c1d24f675c23 Mon Sep 17 00:00:00 2001 From: xiaoch05 Date: Fri, 22 Nov 2024 16:28:27 +0800 Subject: [PATCH] bugfix: withdraw liquidity --- src/relayer/relayer.service.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/relayer/relayer.service.ts b/src/relayer/relayer.service.ts index 3389722..a9fd85c 100644 --- a/src/relayer/relayer.service.ts +++ b/src/relayer/relayer.service.ts @@ -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; @@ -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