WA-521 Adding feature flag for use metamask provider as signer

This commit is contained in:
apanizo 2018-08-22 13:38:35 +02:00
parent 7b262dffc7
commit b960ecefe8
5 changed files with 34 additions and 4 deletions

View File

@ -1,10 +1,16 @@
// @flow // @flow
import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES, ENABLED_TX_SERVICE_REMOVAL_SENDER } from '~/config/names' import {
TX_SERVICE_HOST,
ENABLED_TX_SERVICE_MODULES,
ENABLED_TX_SERVICE_REMOVAL_SENDER,
SIGNATURES_VIA_METAMASK,
} from '~/config/names'
const devConfig = { const devConfig = {
[TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/', [TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false, [ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false, [ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
} }
export default devConfig export default devConfig

View File

@ -1,6 +1,11 @@
// @flow // @flow
import { ensureOnce } from '~/utils/singleton' import { ensureOnce } from '~/utils/singleton'
import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES, ENABLED_TX_SERVICE_REMOVAL_SENDER } from '~/config/names' import {
TX_SERVICE_HOST,
ENABLED_TX_SERVICE_MODULES,
ENABLED_TX_SERVICE_REMOVAL_SENDER,
SIGNATURES_VIA_METAMASK,
} 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'
@ -38,3 +43,9 @@ export const allowedRemoveSenderInTxHistoryService = () => {
return config[ENABLED_TX_SERVICE_REMOVAL_SENDER] return config[ENABLED_TX_SERVICE_REMOVAL_SENDER]
} }
export const signaturesViaMetamask = () => {
const config = getConfig()
return config[SIGNATURES_VIA_METAMASK]
}

View File

@ -3,3 +3,4 @@
export const TX_SERVICE_HOST = 'tsh' export const TX_SERVICE_HOST = 'tsh'
export const ENABLED_TX_SERVICE_MODULES = 'tsm' export const ENABLED_TX_SERVICE_MODULES = 'tsm'
export const ENABLED_TX_SERVICE_REMOVAL_SENDER = 'trs' export const ENABLED_TX_SERVICE_REMOVAL_SENDER = 'trs'
export const SIGNATURES_VIA_METAMASK = 'svm'

View File

@ -1,10 +1,16 @@
// @flow // @flow
import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES, ENABLED_TX_SERVICE_REMOVAL_SENDER } from '~/config/names' import {
TX_SERVICE_HOST,
ENABLED_TX_SERVICE_MODULES,
ENABLED_TX_SERVICE_REMOVAL_SENDER,
SIGNATURES_VIA_METAMASK,
} 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, [ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false, [ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
} }
export default prodConfig export default prodConfig

View File

@ -1,10 +1,16 @@
// @flow // @flow
import { TX_SERVICE_HOST, ENABLED_TX_SERVICE_MODULES, ENABLED_TX_SERVICE_REMOVAL_SENDER } from '~/config/names' import {
TX_SERVICE_HOST,
ENABLED_TX_SERVICE_MODULES,
ENABLED_TX_SERVICE_REMOVAL_SENDER,
SIGNATURES_VIA_METAMASK,
} 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, [ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false, [ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
} }
export default testConfig export default testConfig