diff options
Merge branch 'dev' of github.com:MetaMask/metamask-plugin into obs-store2
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 20 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 2 |
2 files changed, 18 insertions, 4 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index bf3617310..78af80886 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -231,7 +231,21 @@ function createNewVaultAndRestore (password, seed) { } function createNewVaultAndKeychain (password) { - return callBackgroundThenUpdate(background.createNewVaultAndKeychain, password) + return (dispatch) => { + dispatch(actions.showLoadingIndication()) + background.createNewVaultAndKeychain(password, (err, newState) => { + if (err) { + return dispatch(actions.displayWarning(err.message)) + } + background.placeSeedWords((err, newState) => { + if (err) { + return dispatch(actions.displayWarning(err.message)) + } + dispatch(actions.hideLoadingIndication()) + dispatch(actions.updateMetamaskState(newState)) + }) + }) + } } function revealSeedConfirmation () { @@ -286,8 +300,8 @@ function navigateToNewAccountScreen() { } } -function addNewAccount (ringNumber = 0) { - return callBackgroundThenUpdate(background.addNewAccount, ringNumber) +function addNewAccount () { + return callBackgroundThenUpdate(background.addNewAccount) } function showInfoPage () { diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index a6e03c3ed..1bd69f7d9 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -134,7 +134,7 @@ ConfirmTxScreen.prototype.checkBalanceAgainstTx = function (txData) { var address = txData.txParams.from || state.selectedAccount var account = state.accounts[address] var balance = account ? account.balance : '0x0' - var maxCost = new BN(txData.maxCost) + var maxCost = new BN(txData.maxCost, 16) var balanceBn = new BN(ethUtil.stripHexPrefix(balance), 16) return maxCost.gt(balanceBn) |