diff --git a/src/config/development.js b/src/config/development.js index 8bb33afc..b1207463 100644 --- a/src/config/development.js +++ b/src/config/development.js @@ -1,8 +1,9 @@ // @flow -import { TX_SERVICE_HOST } from '~/config/names' +import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names' const devConfig = { [TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/', + [ENABLED_TX_SERVICE_MODULES]: false, } export default devConfig diff --git a/src/config/index.js b/src/config/index.js index 66afd2c3..aa480a2a 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,6 +1,6 @@ // @flow import { ensureOnce } from '~/utils/singleton' -import { TX_SERVICE_HOST } from '~/config/names' +import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names' import devConfig from './development' import testConfig from './testing' import prodConfig from './production' @@ -26,3 +26,9 @@ export const getTxServiceHost = () => { } export const getTxServiceUriFrom = (safeAddress: string) => `safes/${safeAddress}/transactions/` + +export const allowedModulesInTxHistoryService = () => { + const config = getConfig() + + return config[ENABLED_TX_SERVICE_MODULES] +} diff --git a/src/config/names.js b/src/config/names.js index 5e00aa0d..2063af10 100644 --- a/src/config/names.js +++ b/src/config/names.js @@ -1,3 +1,4 @@ // @flow export const TX_SERVICE_HOST = 'tsh' +export const ENABLED_TX_SERVICE_MODULES = 'tsm' diff --git a/src/config/production.js b/src/config/production.js index 7fcb5556..840fd0bb 100644 --- a/src/config/production.js +++ b/src/config/production.js @@ -1,8 +1,9 @@ // @flow -import { TX_SERVICE_HOST } from '~/config/names' +import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names' const prodConfig = { [TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/', + [ENABLED_TX_SERVICE_MODULES]: false, } export default prodConfig diff --git a/src/config/testing.js b/src/config/testing.js index b1b55759..4e8f1a4a 100644 --- a/src/config/testing.js +++ b/src/config/testing.js @@ -1,8 +1,9 @@ // @flow -import { TX_SERVICE_HOST } from '~/config/names' +import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names' const testConfig = { [TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/', + [ENABLED_TX_SERVICE_MODULES]: false, } export default testConfig