WA-521 Adding a feature flag for kwnowing when modules are accepted in TX-history service

This commit is contained in:
apanizo 2018-08-16 13:43:35 +02:00
parent 34e11a13f2
commit 73099b38d6
5 changed files with 14 additions and 4 deletions

View File

@ -1,8 +1,9 @@
// @flow // @flow
import { TX_SERVICE_HOST } from '~/config/names' import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names'
const devConfig = { const devConfig = {
[TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/', [TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
} }
export default devConfig export default devConfig

View File

@ -1,6 +1,6 @@
// @flow // @flow
import { ensureOnce } from '~/utils/singleton' 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 devConfig from './development'
import testConfig from './testing' import testConfig from './testing'
import prodConfig from './production' import prodConfig from './production'
@ -26,3 +26,9 @@ export const getTxServiceHost = () => {
} }
export const getTxServiceUriFrom = (safeAddress: string) => `safes/${safeAddress}/transactions/` export const getTxServiceUriFrom = (safeAddress: string) => `safes/${safeAddress}/transactions/`
export const allowedModulesInTxHistoryService = () => {
const config = getConfig()
return config[ENABLED_TX_SERVICE_MODULES]
}

View File

@ -1,3 +1,4 @@
// @flow // @flow
export const TX_SERVICE_HOST = 'tsh' export const TX_SERVICE_HOST = 'tsh'
export const ENABLED_TX_SERVICE_MODULES = 'tsm'

View File

@ -1,8 +1,9 @@
// @flow // @flow
import { TX_SERVICE_HOST } from '~/config/names' import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names'
const prodConfig = { const prodConfig = {
[TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/', [TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
} }
export default prodConfig export default prodConfig

View File

@ -1,8 +1,9 @@
// @flow // @flow
import { TX_SERVICE_HOST } from '~/config/names' import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES } from '~/config/names'
const testConfig = { const testConfig = {
[TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/', [TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
} }
export default testConfig export default testConfig