1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

importing RBAC url from config file

This commit is contained in:
Jamie Hewitt 2021-05-19 11:54:28 +03:00
parent cf93cf2cbd
commit 73a862c7ec
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ module.exports = {
// networks in their wallet.
// Ocean Protocol contracts are deployed for: 'mainnet', 'rinkeby', 'development'
network: process.env.GATSBY_NETWORK || 'mainnet',
rbacUrl: process.env.RBAC_URL || 'false',
infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx',
@ -43,6 +44,5 @@ module.exports = {
// Used to show or hide the fixed and dynamic price options
// tab to publishers during the price creation.
allowFixedPricing: process.env.GATSBY_ALLOW_FIXED_PRICING || 'true',
allowDynamicPricing: process.env.GATSBY_ALLOW_DYNAMIC_PRICING || 'true',
rbacUrl: process.env.RBAC_URL
allowDynamicPricing: process.env.GATSBY_ALLOW_DYNAMIC_PRICING || 'true'
}

View File

@ -1,4 +1,5 @@
import fetch from 'cross-fetch'
import { rbacUrl, network } from '../../app.config'
export async function rbacRequest(
component: string,
@ -12,7 +13,8 @@ export async function rbacRequest(
token
}
}
console.log('process.env.RBAC_URL', process.env.RBAC_URL)
console.log('rbacUrl', rbacUrl)
console.log('network', network)
try {
const response = await fetch('http://localhost:3000', {
method: 'POST',