aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-04 03:33:15 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-04 03:33:15 +0800
commit2c2cdc4475b0ac8a6a52186a470a49c6a085ca08 (patch)
tree3ad7399679039b58931c72870c0d05011b794b4b /ui/app
parent10c818abac0901724cf7d98bf63728bdeadcdbed (diff)
downloadtangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar.gz
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar.bz2
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar.lz
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar.xz
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.tar.zst
tangerine-wallet-browser-2c2cdc4475b0ac8a6a52186a470a49c6a085ca08.zip
Convert more actions to new simple pattern
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 2ffa352a4..d63d36f19 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -226,14 +226,7 @@ function createNewVaultAndRestore (password, seed) {
}
function createNewVaultAndKeychain (password) {
- return (dispatch) => {
- background.createNewVaultAndKeychain(password, (err, newState) => {
- if (err) {
- return dispatch(actions.displayWarning(err.message))
- }
- dispatch(actions.updateMetamaskState(newState))
- })
- }
+ return callBackgroundThenUpdate(background.createNewVaultAndKeychain, password)
}
function revealSeedConfirmation () {
@@ -255,17 +248,8 @@ function requestRevealSeed (password) {
}
}
-
function addNewKeyring (type, opts) {
- return (dispatch) => {
- dispatch(actions.showLoadingIndication())
- background.addNewKeyring(type, opts, (err) => {
- dispatch(this.hideLoadingIndication())
- if (err) {
- return dispatch(actions.displayWarning(err))
- }
- })
- }
+ return callBackgroundThenUpdate(background.addNewKeyring, type, opts)
}
function addNewAccount (ringNumber = 0) {