From 6ca276f1ad8fd1c5343e2a094d89f572b7db32f7 Mon Sep 17 00:00:00 2001 From: Ji Hwan KIM <125336262+jhkimqd@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:57:00 +0900 Subject: [PATCH] fix: ulxly claim filter logic (#348) Signed-off-by: Ji Hwan --- cmd/ulxly/ulxly.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/ulxly/ulxly.go b/cmd/ulxly/ulxly.go index 40ed2c19..6fae7e1e 100644 --- a/cmd/ulxly/ulxly.go +++ b/cmd/ulxly/ulxly.go @@ -823,9 +823,10 @@ func getDeposits(bridgeServiceDepositsEndpoint string) (globalIndex *big.Int, or amount = new(big.Int) intClaimIndex, _ := strconv.Atoi(*ulxlyInputArgs.ClaimIndex) // Convert deposit_cnt to int + destinationNetwork, _ := strconv.Atoi(*ulxlyInputArgs.ClaimDestinationNetwork) for index, deposit := range bridgeDeposit.Deposit { - intDepositCnt, _ := strconv.Atoi(deposit.DepositCnt) // Convert deposit_cnt to int - if intDepositCnt == intClaimIndex { // deposit_cnt must match the user's input value + intDepositCnt, _ := strconv.Atoi(deposit.DepositCnt) // Convert deposit_cnt to int + if intDepositCnt == intClaimIndex && destinationNetwork == deposit.DestNet { // deposit_cnt must match the user's input value if !bridgeDeposit.Deposit[index].ReadyForClaim { log.Error().Msg("The claim transaction is not yet ready to be claimed. Try again in a few blocks.") return nil, common.HexToAddress("0x0"), nil, nil, errors.New("the claim transaction is not yet ready to be claimed, try again in a few blocks")