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
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 = {
[TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
}
export default devConfig

View File

@ -1,6 +1,11 @@
// @flow
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 testConfig from './testing'
import prodConfig from './production'
@ -38,3 +43,9 @@ export const allowedRemoveSenderInTxHistoryService = () => {
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 ENABLED_TX_SERVICE_MODULES = 'tsm'
export const ENABLED_TX_SERVICE_REMOVAL_SENDER = 'trs'
export const SIGNATURES_VIA_METAMASK = 'svm'

View File

@ -1,10 +1,16 @@
// @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 = {
[TX_SERVICE_HOST]: 'https://safe-transaction-history.dev.gnosisdev.com/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
}
export default prodConfig

View File

@ -1,10 +1,16 @@
// @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 = {
[TX_SERVICE_HOST]: 'http://localhost:8000/api/v1/',
[ENABLED_TX_SERVICE_MODULES]: false,
[ENABLED_TX_SERVICE_REMOVAL_SENDER]: false,
[SIGNATURES_VIA_METAMASK]: true,
}
export default testConfig