diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-21 23:53:34 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-21 23:53:34 +0800 |
commit | 0e43606b162db28c72ea0b76a14a92f88c8f2109 (patch) | |
tree | 7c6e7006ec35dfe28543d2bd246ae820f30d959f /ui/app/actions.js | |
parent | a7b7be8309b5b81514b9ef748e315f01d02bc178 (diff) | |
download | tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar.gz tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar.bz2 tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar.lz tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar.xz tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.tar.zst tangerine-wallet-browser-0e43606b162db28c72ea0b76a14a92f88c8f2109.zip |
Adjust private key confirmation style and logic.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index b09021577..9d6676d01 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -698,7 +698,7 @@ function setRpcTarget (newRpc) { } } -// Calls the addressBookController to add a new address. +// Calls the addressBookController to add a new address. function addToAddressBook (recipient, nickname) { log.debug(`background.addToAddressBook`) return (dispatch) => { @@ -772,22 +772,30 @@ function requestExportAccount () { } } -function exportAccount (address) { +function exportAccount (password, address) { var self = this return function (dispatch) { dispatch(self.showLoadingIndication()) - log.debug(`background.exportAccount`) - background.exportAccount(address, function (err, result) { - dispatch(self.hideLoadingIndication()) - + log.debug(`background.submitPassword`) + background.submitPassword(password, function (err) { if (err) { - log.error(err) - return dispatch(self.displayWarning('Had a problem exporting the account.')) + log.error('Error in submiting password.') + dispatch(self.hideLoadingIndication()) + return dispatch(self.displayWarning('Incorrect Password.')) } + log.debug(`background.exportAccount`) + background.exportAccount(address, function (err, result) { + dispatch(self.hideLoadingIndication()) - dispatch(self.showPrivateKey(result)) + if (err) { + log.error(err) + return dispatch(self.displayWarning('Had a problem exporting the account.')) + } + + dispatch(self.showPrivateKey(result)) + }) }) } } |