From a7c1db215e4fdaf6c042461fe17f8a4983ab38bd Mon Sep 17 00:00:00 2001 From: Norbi <37236152+KatunaNorbert@users.noreply.github.com> Date: Wed, 28 Jul 2021 15:51:26 +0300 Subject: [PATCH] Fix broken explorer links for multinetwork (#761) * external link get oceanConfing when undefined, use chainId for pools * pass chainId to editHistory explorerLinks * remove ddo check from Pool explorer link * removed chainId verfication from datatoken external link path * add Gaia-X chainId verification to pool datatoken external link * add chainId check for Moonbeam --- src/components/atoms/ExplorerLink.tsx | 2 +- src/components/organisms/AssetActions/Pool/index.tsx | 8 ++++---- src/components/organisms/AssetContent/EditHistory.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/atoms/ExplorerLink.tsx b/src/components/atoms/ExplorerLink.tsx index c2829547e..9f5b23850 100644 --- a/src/components/atoms/ExplorerLink.tsx +++ b/src/components/atoms/ExplorerLink.tsx @@ -33,7 +33,7 @@ export default function ExplorerLink({ setOceanConfig(oceanInitialConfig) setUrl(oceanInitialConfig?.explorerUri) } - if (ocean === undefined) { + if (oceanConfig === undefined) { initOcean() } }, [config, networkId, ocean]) diff --git a/src/components/organisms/AssetActions/Pool/index.tsx b/src/components/organisms/AssetActions/Pool/index.tsx index 5aa603bac..cb26f3af9 100644 --- a/src/components/organisms/AssetActions/Pool/index.tsx +++ b/src/components/organisms/AssetActions/Pool/index.tsx @@ -65,7 +65,7 @@ export default function Pool(): ReactElement { const data = useStaticQuery(contentQuery) const content = data.content.edges[0].node.childContentJson.pool - const { accountId, networkId } = useWeb3() + const { accountId } = useWeb3() const { ocean } = useOcean() const { isInPurgatory, ddo, owner, price, refreshInterval, isAssetNetwork } = useAsset() @@ -278,15 +278,15 @@ export default function Pool(): ReactElement {
Pool {receipts?.map((receipt) => (
  • - + edited{' '}
  • ))}
  • - + published