mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
make metadataStoreUri part of app config
This commit is contained in:
parent
32d637c203
commit
74a2c182e9
@ -2,5 +2,6 @@
|
||||
GATSBY_NETWORK="rinkeby"
|
||||
|
||||
#GATSBY_INFURA_PROJECT_ID="xxx"
|
||||
#GATSBY_METADATA_STORE_URI="xxx"
|
||||
#GATSBY_MARKET_FEE_ADDRESS="0xxx"
|
||||
#GATSBY_MARKET_FEE_AMOUNT="xxx"
|
@ -1,6 +1,7 @@
|
||||
module.exports = {
|
||||
network: process.env.GATSBY_NETWORK || 'rinkeby',
|
||||
infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx',
|
||||
metadataStoreUri: process.env.GATSBY_METADATA_STORE_URI,
|
||||
marketFeeAddress:
|
||||
process.env.GATSBY_MARKET_FEE_ADDRESS ||
|
||||
'0x903322C7E45A60d7c8C3EA236c5beA9Af86310c7',
|
||||
|
@ -24,13 +24,17 @@ export default function wrapRootElement({
|
||||
}: {
|
||||
element: ReactElement
|
||||
}): ReactElement {
|
||||
const oceanInitialConfig = getOceanConfig(appConfig.network)
|
||||
const { metadataStoreUri, network } = appConfig
|
||||
const oceanInitialConfig = getOceanConfig(network)
|
||||
|
||||
const initialConfig = {
|
||||
...oceanInitialConfig,
|
||||
// add metadataStoreUri only when defined
|
||||
...(metadataStoreUri && { metadataStoreUri })
|
||||
}
|
||||
|
||||
return (
|
||||
<OceanProvider
|
||||
initialConfig={oceanInitialConfig}
|
||||
web3ModalOpts={web3ModalOpts}
|
||||
>
|
||||
<OceanProvider initialConfig={initialConfig} web3ModalOpts={web3ModalOpts}>
|
||||
<UserPreferencesProvider>
|
||||
<NetworkMonitor />
|
||||
{element}
|
||||
|
Loading…
Reference in New Issue
Block a user