From ae5e8b8f6c34c0899b3cdf042ddaffd3285adc74 Mon Sep 17 00:00:00 2001 From: SGiaccobasso Date: Thu, 28 Nov 2024 01:00:59 -0300 Subject: [PATCH] chore: prevent error after deploying remote token --- .../CanonicalTokenDeployment/steps/review/Review.tsx | 2 +- apps/maestro/src/services/axelarscan/hooks.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/maestro/src/features/CanonicalTokenDeployment/steps/review/Review.tsx b/apps/maestro/src/features/CanonicalTokenDeployment/steps/review/Review.tsx index 46ba7454a..a97fdd631 100644 --- a/apps/maestro/src/features/CanonicalTokenDeployment/steps/review/Review.tsx +++ b/apps/maestro/src/features/CanonicalTokenDeployment/steps/review/Review.tsx @@ -45,7 +45,7 @@ const Review: FC = () => { chain.id, state.txState.txHash, state.selectedChains.map( - (axelarChainId) => computed.indexedById[axelarChainId].chain_id + (axelarChainId) => computed.indexedById[axelarChainId]?.chain_id ) ); } diff --git a/apps/maestro/src/services/axelarscan/hooks.ts b/apps/maestro/src/services/axelarscan/hooks.ts index a2a06e6ba..fef4a7726 100644 --- a/apps/maestro/src/services/axelarscan/hooks.ts +++ b/apps/maestro/src/services/axelarscan/hooks.ts @@ -135,10 +135,14 @@ export function useEVMChainConfigsQuery() { return { ...queryResult, + // TODO: remove this once we have the sui chain data data: [...configured, suiChainMockData], computed: { - indexedByChainId: indexBy(prop("chain_id"), configured), - indexedById: indexBy(prop("id"), configured), + indexedByChainId: indexBy(prop("chain_id"), [ + ...configured, + suiChainMockData, + ]), + indexedById: indexBy(prop("id"), [...configured, suiChainMockData]), wagmiChains, }, };