From 7803f8a8ef7ff6a9da92eac4ee5ffe3b72db4ce0 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:00:42 +0000 Subject: [PATCH 1/2] fix(relayer): Safe default for unknown MDC --- src/relayer/Relayer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/relayer/Relayer.ts b/src/relayer/Relayer.ts index d42cf2dab..fba38712e 100644 --- a/src/relayer/Relayer.ts +++ b/src/relayer/Relayer.ts @@ -337,7 +337,7 @@ export class Relayer { return ignoreDeposit(); } - const { minConfirmations } = minDepositConfirmations[originChainId].find(({ usdThreshold }) => + const { minConfirmations = 100_000 } = minDepositConfirmations[originChainId]?.find(({ usdThreshold }) => usdThreshold.gte(fillAmountUsd) ); const { latestBlockSearched } = spokePoolClients[originChainId]; From b4186945fd9f63f4cb0c0baadb601844c3c97410 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:13:11 +0100 Subject: [PATCH 2/2] Update src/relayer/Relayer.ts --- src/relayer/Relayer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/relayer/Relayer.ts b/src/relayer/Relayer.ts index fba38712e..82c9f889e 100644 --- a/src/relayer/Relayer.ts +++ b/src/relayer/Relayer.ts @@ -337,7 +337,7 @@ export class Relayer { return ignoreDeposit(); } - const { minConfirmations = 100_000 } = minDepositConfirmations[originChainId]?.find(({ usdThreshold }) => + const { minConfirmations = 100_000 } = minDepositConfirmations[originChainId].find(({ usdThreshold }) => usdThreshold.gte(fillAmountUsd) ); const { latestBlockSearched } = spokePoolClients[originChainId];