1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

[NewUI] Fixes tests and sends user to NewUI after registering. (#2788)

* Fixes tests and sends user to NewUI after registering.

* Karma config?

* Empty commit

* Remove unneeded json state mock file.
This commit is contained in:
Dan J Miller 2017-12-21 23:33:01 -03:30 committed by Alexander Tseung
parent 4ef71f0365
commit 4acd48966e
6 changed files with 12 additions and 8 deletions

View File

@ -8,6 +8,7 @@
"frequentRpcList": [], "frequentRpcList": [],
"unapprovedTxs": {}, "unapprovedTxs": {},
"currentCurrency": "USD", "currentCurrency": "USD",
"featureFlags": {"betaUI": true},
"conversionRate": 12.7527416, "conversionRate": 12.7527416,
"conversionDate": 1487624341, "conversionDate": 1487624341,
"noActiveNotices": false, "noActiveNotices": false,

View File

@ -54,6 +54,8 @@ module.exports = function(config) {
// Concurrency level // Concurrency level
// how many browser should be started simultaneous // how many browser should be started simultaneous
concurrency: Infinity concurrency: 1,
nocache: true,
} }
} }

View File

@ -51,9 +51,8 @@ describe('tx confirmation screen', function () {
actions.cancelTx({value: firstTxId})((action) => { actions.cancelTx({value: firstTxId})((action) => {
result = reducers(initialState, action) result = reducers(initialState, action)
done()
}) })
done()
}) })
it('should transition to the account detail view', function () { it('should transition to the account detail view', function () {

View File

@ -13,6 +13,7 @@ function mapStateToProps (state) {
autoAdd: autoAddToBetaUI(state), autoAdd: autoAddToBetaUI(state),
isUnlocked: state.metamask.isUnlocked, isUnlocked: state.metamask.isUnlocked,
isMascara: state.metamask.isMascara, isMascara: state.metamask.isMascara,
firstTime: Object.keys(state.metamask.identities).length === 0,
} }
} }
@ -35,9 +36,10 @@ SelectedApp.prototype.componentWillReceiveProps = function (nextProps) {
setFeatureFlagWithModal, setFeatureFlagWithModal,
setFeatureFlagWithoutModal, setFeatureFlagWithoutModal,
isMascara, isMascara,
firstTime,
} = this.props } = this.props
if (isMascara) { if (isMascara || firstTime) {
setFeatureFlagWithoutModal() setFeatureFlagWithoutModal()
} else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) { } else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) {
setFeatureFlagWithModal() setFeatureFlagWithModal()
@ -45,7 +47,8 @@ SelectedApp.prototype.componentWillReceiveProps = function (nextProps) {
} }
SelectedApp.prototype.render = function () { SelectedApp.prototype.render = function () {
const { betaUI, isMascara } = this.props const { betaUI, isMascara, firstTime } = this.props
const Selected = betaUI || isMascara ? App : OldApp
const Selected = betaUI || isMascara || firstTime ? App : OldApp
return h(Selected) return h(Selected)
} }

View File

@ -572,7 +572,7 @@ SendTransactionScreen.prototype.getEditedTx = function () {
from: ethUtil.addHexPrefix(from), from: ethUtil.addHexPrefix(from),
gas: ethUtil.addHexPrefix(gas), gas: ethUtil.addHexPrefix(gas),
gasPrice: ethUtil.addHexPrefix(gasPrice), gasPrice: ethUtil.addHexPrefix(gasPrice),
} },
} }
if (selectedToken) { if (selectedToken) {

View File

@ -8,7 +8,6 @@ global.log = require('loglevel')
module.exports = launchMetamaskUi module.exports = launchMetamaskUi
log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn') log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn')
function launchMetamaskUi (opts, cb) { function launchMetamaskUi (opts, cb) {