mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fix next.js env vars
This commit is contained in:
parent
4f4f5d30d4
commit
1cf69c2423
14
.env.example
14
.env.example
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#NEXT_INFURA_PROJECT_ID="xxx"
|
#NEXT_PUBLIC_INFURA_PROJECT_ID="xxx"
|
||||||
#NEXT_MARKET_FEE_ADDRESS="0xxx"
|
#NEXT_PUBLIC_MARKET_FEE_ADDRESS="0xxx"
|
||||||
#NEXT_PORTIS_ID="xxx"
|
#NEXT_PUBLIC_PORTIS_ID="xxx"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -9,9 +9,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Toggle pricing options presented during price creation
|
# Toggle pricing options presented during price creation
|
||||||
#NEXT_ALLOW_FIXED_PRICING="true"
|
#NEXT_PUBLIC_ALLOW_FIXED_PRICING="true"
|
||||||
#NEXT_ALLOW_DYNAMIC_PRICING="true"
|
#NEXT_PUBLIC_ALLOW_DYNAMIC_PRICING="true"
|
||||||
#NEXT_ALLOW_FREE_PRICING="true"
|
#NEXT_PUBLIC_ALLOW_FREE_PRICING="true"
|
||||||
|
|
||||||
# Privacy Preference Center
|
# Privacy Preference Center
|
||||||
#NEXT_PRIVACY_PREFERENCE_CENTER="true"
|
#NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER="true"
|
||||||
|
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@ -16,8 +16,8 @@ jobs:
|
|||||||
|
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
env:
|
env:
|
||||||
NEXT_INFURA_PROJECT_ID: ${{ secrets.NEXT_INFURA_PROJECT_ID }}
|
NEXT_PUBLIC_INFURA_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_INFURA_PROJECT_ID }}
|
||||||
NEXT_PORTIS_ID: ${{ secrets.NEXT_PORTIS_ID }}
|
NEXT_PUBLIC_PORTIS_ID: ${{ secrets.NEXT_PUBLIC_PORTIS_ID }}
|
||||||
|
|
||||||
- run: npm run deploy:s3
|
- run: npm run deploy:s3
|
||||||
env:
|
env:
|
||||||
|
@ -340,15 +340,15 @@ Everything else is made open according to the apache2 license. We look forward t
|
|||||||
|
|
||||||
### Dynamic Pricing
|
### Dynamic Pricing
|
||||||
|
|
||||||
To allow publishers to set pricing as "Dynamic" you need to add the following environmental variable to your .env file: `NEXT_ALLOW_DYNAMIC_PRICING="true"` (default).
|
To allow publishers to set pricing as "Dynamic" you need to add the following environmental variable to your .env file: `NEXT_PUBLIC_ALLOW_DYNAMIC_PRICING="true"` (default).
|
||||||
|
|
||||||
### Fixed Pricing
|
### Fixed Pricing
|
||||||
|
|
||||||
To allow publishers to set pricing as "Fixed" you need to add the following environmental variable to your .env file: `NEXT_ALLOW_FIXED_PRICING="true"` (default).
|
To allow publishers to set pricing as "Fixed" you need to add the following environmental variable to your .env file: `NEXT_PUBLIC_ALLOW_FIXED_PRICING="true"` (default).
|
||||||
|
|
||||||
### Free Pricing
|
### Free Pricing
|
||||||
|
|
||||||
To allow publishers to set pricing as "Free" you need to add the following environmental variable to your .env file: `NEXT_ALLOW_FREE_PRICING="true"` (default).
|
To allow publishers to set pricing as "Free" you need to add the following environmental variable to your .env file: `NEXT_PUBLIC_ALLOW_FREE_PRICING="true"` (default).
|
||||||
|
|
||||||
This allocates the datatokens to the [dispenser contract](https://github.com/oceanprotocol/contracts/blob/main/contracts/dispenser/Dispenser.sol) which dispenses data tokens to users for free. Publishers in your market will now be able to offer their datasets to users for free (excluding gas costs).
|
This allocates the datatokens to the [dispenser contract](https://github.com/oceanprotocol/contracts/blob/main/contracts/dispenser/Dispenser.sol) which dispenses data tokens to users for free. Publishers in your market will now be able to offer their datasets to users for free (excluding gas costs).
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ Feel free to adopt our provided privacy policies to your needs. Per default we c
|
|||||||
|
|
||||||
### Privacy Preference Center
|
### Privacy Preference Center
|
||||||
|
|
||||||
Additionally, Ocean Market provides a privacy preference center for you to use. This feature is disabled per default since we do not use cookies requiring consent on our deployment of the market. However, if you need to add some functionality depending on cookies, you can simply enable this feature by changing the value of the `NEXT_PRIVACY_PREFERENCE_CENTER` environmental variable to `"true"` in your `.env` file. This will enable a customizable cookie banner stating the use of your individual cookies. The content of this banner can be adjusted within the `content/gdpr.json` file. If no `optionalCookies` are provided, the privacy preference center will be set to a simpler version displaying only the `title`, `text` and `close`-button. This can be used to inform the user about the use of essential cookies, where no consent is needed. The privacy preference center supports two different styling options: `'small'` and `'default'`. Setting the style propertie to `'small'` will display a smaller cookie banner to the user at first, only showing the default styled privacy preference center upon the user's customization request.
|
Additionally, Ocean Market provides a privacy preference center for you to use. This feature is disabled per default since we do not use cookies requiring consent on our deployment of the market. However, if you need to add some functionality depending on cookies, you can simply enable this feature by changing the value of the `NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER` environmental variable to `"true"` in your `.env` file. This will enable a customizable cookie banner stating the use of your individual cookies. The content of this banner can be adjusted within the `content/gdpr.json` file. If no `optionalCookies` are provided, the privacy preference center will be set to a simpler version displaying only the `title`, `text` and `close`-button. This can be used to inform the user about the use of essential cookies, where no consent is needed. The privacy preference center supports two different styling options: `'small'` and `'default'`. Setting the style propertie to `'small'` will display a smaller cookie banner to the user at first, only showing the default styled privacy preference center upon the user's customization request.
|
||||||
|
|
||||||
Now your market users will be provided with additional options to toggle the use of your configured cookie consent categories. You can always retrieve the current consent status per category with the provided `useConsent()` hook. See below, how you can set your own custom cookies depending on the market user's consent. Feel free to adjust the provided utility functions for cookie usage provided in the `src/utils/cookies.ts` file to your needs.
|
Now your market users will be provided with additional options to toggle the use of your configured cookie consent categories. You can always retrieve the current consent status per category with the provided `useConsent()` hook. See below, how you can set your own custom cookies depending on the market user's consent. Feel free to adjust the provided utility functions for cookie usage provided in the `src/utils/cookies.ts` file to your needs.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
// URI of single metadata cache instance for all networks.
|
// URI of single metadata cache instance for all networks.
|
||||||
// While ocean.js includes this value for each network as part of its ConfigHelper,
|
// While ocean.js includes this value for each network as part of its ConfigHelper,
|
||||||
// it is assumed to be the same for all networks.
|
// it is assumed to be the same for all networks.
|
||||||
@ -6,7 +6,8 @@ module.exports = {
|
|||||||
// const { appConfig } = useSiteMetadata()
|
// const { appConfig } = useSiteMetadata()
|
||||||
// return appConfig.metadataCacheUri
|
// return appConfig.metadataCacheUri
|
||||||
metadataCacheUri:
|
metadataCacheUri:
|
||||||
process.env.METADATACACHE_URI || 'https://aquarius.oceanprotocol.com',
|
process.env.NEXT_PUBLIC_METADATACACHE_URI ||
|
||||||
|
'https://aquarius.oceanprotocol.com',
|
||||||
|
|
||||||
// List of chainIds which metadata cache queries will return by default.
|
// List of chainIds which metadata cache queries will return by default.
|
||||||
// This preselects the Chains user preferences.
|
// This preselects the Chains user preferences.
|
||||||
@ -15,11 +16,11 @@ module.exports = {
|
|||||||
// List of all supported chainIds. Used to populate the Chains user preferences list.
|
// List of all supported chainIds. Used to populate the Chains user preferences list.
|
||||||
chainIdsSupported: [1, 3, 4, 137, 80001, 1287, 56, 2021000, 1285, 246],
|
chainIdsSupported: [1, 3, 4, 137, 80001, 1287, 56, 2021000, 1285, 246],
|
||||||
|
|
||||||
infuraProjectId: process.env.NEXT_INFURA_PROJECT_ID || 'xxx',
|
infuraProjectId: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID || 'xxx',
|
||||||
|
|
||||||
// The ETH address the marketplace fee will be sent to.
|
// The ETH address the marketplace fee will be sent to.
|
||||||
marketFeeAddress:
|
marketFeeAddress:
|
||||||
process.env.NEXT_MARKET_FEE_ADDRESS ||
|
process.env.NEXT_PUBLIC_MARKET_FEE_ADDRESS ||
|
||||||
'0x9984b2453eC7D99a73A5B3a46Da81f197B753C8d',
|
'0x9984b2453eC7D99a73A5B3a46Da81f197B753C8d',
|
||||||
|
|
||||||
// Used for conversion display, can be whatever coingecko API supports
|
// Used for conversion display, can be whatever coingecko API supports
|
||||||
@ -48,13 +49,13 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Wallets
|
// Wallets
|
||||||
portisId: process.env.NEXT_PORTIS_ID || 'xxx',
|
portisId: process.env.NEXT_PUBLIC_PORTIS_ID || 'xxx',
|
||||||
|
|
||||||
// Used to show or hide the fixed, dynamic or free price options
|
// Used to show or hide the fixed, dynamic or free price options
|
||||||
// tab to publishers during the price creation.
|
// tab to publishers during the price creation.
|
||||||
allowFixedPricing: process.env.NEXT_ALLOW_FIXED_PRICING || 'true',
|
allowFixedPricing: process.env.NEXT_PUBLIC_ALLOW_FIXED_PRICING || 'true',
|
||||||
allowDynamicPricing: process.env.NEXT_ALLOW_DYNAMIC_PRICING || 'true',
|
allowDynamicPricing: process.env.NEXT_PUBLIC_ALLOW_DYNAMIC_PRICING || 'true',
|
||||||
allowFreePricing: process.env.NEXT_ALLOW_FREE_PRICING || 'true',
|
allowFreePricing: process.env.NEXT_PUBLIC_ALLOW_FREE_PRICING || 'true',
|
||||||
|
|
||||||
// Set the default privacy policy to initially display
|
// Set the default privacy policy to initially display
|
||||||
// this should be the slug of your default policy markdown file
|
// this should be the slug of your default policy markdown file
|
||||||
@ -65,5 +66,6 @@ module.exports = {
|
|||||||
// If set to true a gdpr.json file inside the content directory
|
// If set to true a gdpr.json file inside the content directory
|
||||||
// is used to create and show a privacy preference center / cookie banner
|
// is used to create and show a privacy preference center / cookie banner
|
||||||
// To learn more about how to configure and use this, please refer to the readme
|
// To learn more about how to configure and use this, please refer to the readme
|
||||||
privacyPreferenceCenter: process.env.NEXT_PRIVACY_PREFERENCE_CENTER || 'false'
|
privacyPreferenceCenter:
|
||||||
|
process.env.NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER || 'false'
|
||||||
}
|
}
|
@ -14,7 +14,7 @@ export function getOceanConfig(network: string | number): ConfigHelperConfig {
|
|||||||
network === 'gaiaxtestnet' ||
|
network === 'gaiaxtestnet' ||
|
||||||
network === 2021000
|
network === 2021000
|
||||||
? undefined
|
? undefined
|
||||||
: process.env.NEXT_INFURA_PROJECT_ID
|
: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID
|
||||||
) as ConfigHelperConfig
|
) as ConfigHelperConfig
|
||||||
return config as ConfigHelperConfig
|
return config as ConfigHelperConfig
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"./src/**/*",
|
"./src/**/*",
|
||||||
"./tests/**/*",
|
"./tests/**/*",
|
||||||
"./app.config.js",
|
|
||||||
"./next-env.d.ts",
|
"./next-env.d.ts",
|
||||||
"./content/**/*"
|
"./content/**/*",
|
||||||
|
"app.config.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user