diff --git a/api/limits.ts b/api/limits.ts index 992a19770..e10d3a2f4 100644 --- a/api/limits.ts +++ b/api/limits.ts @@ -85,15 +85,12 @@ const handler = async ( outputToken, } = validateChainAndTokenParams(query); - const minDepositUsdForDestinationChainId = Number( - process.env[`MIN_DEPOSIT_USD_${destinationChainId}`] ?? - MIN_DEPOSIT_USD ?? - 0 - ); - console.log( - `minDepositUsdForDestinationChainId:`, - minDepositUsdForDestinationChainId + let minDepositUsdForDestinationChainId = Number( + process.env[`MIN_DEPOSIT_USD_${destinationChainId}`] ?? MIN_DEPOSIT_USD ); + if (isNaN(minDepositUsdForDestinationChainId)) { + minDepositUsdForDestinationChainId = 0; + } const hubPool = getHubPool(provider); const configStoreClient = new sdk.contracts.acrossConfigStore.Client(