Skip to content

Commit

Permalink
fix aggregate custom chain mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Aug 24, 2023
1 parent 9b5c808 commit 83b5bb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export const runAggregateDataAllAdapters = async (timestamp: number, hourly: boo
const chainsPromises = Promise.all(
chains.map(async (chain) => {
try {
await aggregateData(timestamp, bridgeDbName, chain, hourly, largeTxThreshold);
let chainContractsAreOn = bridgeNetwork.chainMapping?.[chain] ? bridgeNetwork.chainMapping?.[chain] : chain;
chainContractsAreOn = chainContractsAreOn === "avax" ? "avalanche" : chainContractsAreOn;
await aggregateData(timestamp, bridgeDbName, chainContractsAreOn, hourly, largeTxThreshold);
} catch (e) {
const errString = `Unable to aggregate hourly data for ${bridgeDbName} on chain ${chain}, skipping.`;
await insertErrorRow({
Expand Down

0 comments on commit 83b5bb5

Please sign in to comment.