diff --git a/src/components/BlockExplorer.tsx b/src/components/BlockExplorer.tsx index b7fd14d2..2c6263fd 100644 --- a/src/components/BlockExplorer.tsx +++ b/src/components/BlockExplorer.tsx @@ -2,7 +2,7 @@ import { chooseUrl, config } from "../config"; import { useGlobalContext } from "../context/Global"; const blockExplorerLink = (asset: string, isTxId: boolean, val: string) => { - const basePath = chooseUrl(config.assets[asset].blockExplorerUrl); + const basePath = chooseUrl(config.assets[asset]?.blockExplorerUrl); return `${basePath}/${isTxId ? "tx" : "address"}/${val}`; }; diff --git a/src/utils/helper.ts b/src/utils/helper.ts index 1e79f726..60abc217 100644 --- a/src/utils/helper.ts +++ b/src/utils/helper.ts @@ -22,7 +22,7 @@ export const getLockupAddress = (swap: SubmarineSwap | ChainSwap) => { if (swap.type === SwapType.Submarine) { return (swap as SubmarineSwap).address; } - return (swap as ChainSwap).lockupDetails.lockupAddress; + return (swap as ChainSwap).lockupDetails?.lockupAddress; }; export const parseBlindingKey = (swap: SomeSwap, isRefund: boolean) => {