aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-03-23 00:57:15 +0800
committerGitHub <noreply@github.com>2017-03-23 00:57:15 +0800
commit9ac2ce1744b5bcebe69b636925f2c952a076cbe4 (patch)
tree0b15cdb8d041e2563c70bfb49a99dbaf47ff6aed /ui/app/actions.js
parentf2e40e85b7751e891ce04935ad85a984076495fd (diff)
parent864f8b06f9f2ec56b7ffce0afe83a1d70c3c7843 (diff)
downloadtangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar.gz
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar.bz2
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar.lz
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar.xz
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.tar.zst
tangerine-wallet-browser-9ac2ce1744b5bcebe69b636925f2c952a076cbe4.zip
Merge branch 'master' into i1033-spinnerfix
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 3b1fc0435..d02b7dcaa 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -773,22 +773,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))
+ })
})
}
}