From a9ec0b8e5b4f4ce75de7b64f23abfd0b6af2fb90 Mon Sep 17 00:00:00 2001 From: Sophia Date: Fri, 5 Apr 2024 11:23:08 -0400 Subject: [PATCH] Update pools hash to hide NS2 onboarding (#2073) * Update pools hash to hide NS2 onboarding * Oops * Add key back * Show banner only if wallet is connected --- centrifuge-app/src/components/Root.tsx | 3 ++- centrifuge-app/src/components/SupportedBrowserBanner.tsx | 4 +++- centrifuge-app/src/config.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/centrifuge-app/src/components/Root.tsx b/centrifuge-app/src/components/Root.tsx index 72121eb737..00cf542594 100644 --- a/centrifuge-app/src/components/Root.tsx +++ b/centrifuge-app/src/components/Root.tsx @@ -79,7 +79,7 @@ export function Root() { - + + setDebugState(state)}> diff --git a/centrifuge-app/src/components/SupportedBrowserBanner.tsx b/centrifuge-app/src/components/SupportedBrowserBanner.tsx index 78a34e4b1b..712ee1f026 100644 --- a/centrifuge-app/src/components/SupportedBrowserBanner.tsx +++ b/centrifuge-app/src/components/SupportedBrowserBanner.tsx @@ -1,7 +1,9 @@ +import { useWallet } from '@centrifuge/centrifuge-react' import { Banner, Text } from '@centrifuge/fabric' import * as React from 'react' export const SupportedBrowserBanner = () => { + const wallet = useWallet() const storageKey = 'browser-banner-seen' const isSupported = navigator.userAgent.indexOf('Chrome') > -1 const [isOpen, setIsOpen] = React.useState(false) @@ -15,7 +17,7 @@ export const SupportedBrowserBanner = () => { setIsOpen(false) } - if (isSupported) { + if (isSupported || !wallet.connectedNetwork) { return null } diff --git a/centrifuge-app/src/config.ts b/centrifuge-app/src/config.ts index fef2a5e922..601035265e 100644 --- a/centrifuge-app/src/config.ts +++ b/centrifuge-app/src/config.ts @@ -144,7 +144,7 @@ const mainnetConfig = { chainId: 1, poolRegistryAddress: '0x5ba1e12693dc8f9c48aad8770482f4739beed696', tinlakeUrl: 'https://tinlake.centrifuge.io', - poolsHash: 'QmVL3N8A1LB6EoWbnH1qDn4XBCWHcL74gfRMJprzstPK8Z', // TODO: add registry to config and fetch poolHash + poolsHash: 'QmRzbEpwFnJE8M4URQEA9JB7pCbh98XnbowXXH8tipoPL3', // TODO: add registry to config and fetch poolHash blockExplorerUrl: 'https://etherscan.io', }