1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
This commit is contained in:
Matthias Kretschmann 2020-08-11 09:14:44 +02:00
parent 148f11fc4f
commit 062530f523
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 12 additions and 11 deletions

View File

@ -1,14 +1,23 @@
import React, { ReactElement } from 'react'
import { OceanProvider } from '@oceanprotocol/react'
import { web3ModalOpts, getOceanConfig } from '../utils/wallet'
import { network } from '../../app.config'
import { ConfigHelper } from '@oceanprotocol/lib'
import { web3ModalOpts } from '../utils/wallet'
import { useSiteMetadata } from '../hooks/useSiteMetadata'
function getOceanConfig(network: string): ConfigHelper {
return new ConfigHelper().getConfig(
network,
process.env.GATSBY_INFURA_PROJECT_ID
)
}
export default function wrapRootElement({
element
}: {
element: ReactElement
}): ReactElement {
const oceanInitialConfig = getOceanConfig(network)
const { appConfig } = useSiteMetadata()
const oceanInitialConfig = getOceanConfig(appConfig.network)
return (
<OceanProvider

View File

@ -1,13 +1,5 @@
import loadable from '@loadable/component'
import { infuraProjectId, network } from '../../app.config'
import { ConfigHelper } from '@oceanprotocol/lib'
export function getOceanConfig(network: string): ConfigHelper {
return new ConfigHelper().getConfig(
network,
process.env.GATSBY_INFURA_PROJECT_ID
)
}
const web3ModalTheme = {
background: 'var(--brand-white)',