Skip to content

Commit

Permalink
chore: allow for backup if env are malformed
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris committed Sep 6, 2024
1 parent 5d91300 commit abffb55
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions api/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit abffb55

Please sign in to comment.