Skip to content

Commit

Permalink
Update pools hash to hide NS2 onboarding (#2073)
Browse files Browse the repository at this point in the history
* Update pools hash to hide NS2 onboarding

* Oops

* Add key back

* Show banner only if wallet is connected
  • Loading branch information
sophialittlejohn authored Apr 5, 2024
1 parent 93acf86 commit a9ec0b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion centrifuge-app/src/components/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function Root() {
<CentrifugeProvider config={centConfig}>
<Router>
<DemoBanner />
<SupportedBrowserBanner />

<WalletProvider
evmChains={evmChains}
subscanUrl={import.meta.env.REACT_APP_SUBSCAN_URL}
Expand All @@ -88,6 +88,7 @@ export function Root() {
showTestNets={debugState.showTestNets as any}
showFinoa={debugState.showFinoa as any}
>
<SupportedBrowserBanner />
<OnboardingAuthProvider>
<OnboardingProvider>
<DebugFlags onChange={(state) => setDebugState(state)}>
Expand Down
4 changes: 3 additions & 1 deletion centrifuge-app/src/components/SupportedBrowserBanner.tsx
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -15,7 +17,7 @@ export const SupportedBrowserBanner = () => {
setIsOpen(false)
}

if (isSupported) {
if (isSupported || !wallet.connectedNetwork) {
return null
}

Expand Down
2 changes: 1 addition & 1 deletion centrifuge-app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}

Expand Down

0 comments on commit a9ec0b8

Please sign in to comment.