aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-21 07:18:54 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-21 07:18:54 +0800
commit95a3cfe3fcffee2ffabd4cf71e568ae94693b10f (patch)
tree9c19992a823fb76a790cfdcbabb11ac1dc9b8fc1 /ui/app/actions.js
parent24fc5f9ea3a8cddfbf3993bdf0b18187a0787a64 (diff)
downloadtangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar.gz
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar.bz2
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar.lz
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar.xz
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.tar.zst
tangerine-wallet-browser-95a3cfe3fcffee2ffabd4cf71e568ae94693b10f.zip
Added ability to nickname wallets locally
The changes are persisted to localstorage, so they cannot be restored on a new computer, but for right now it's a nice organizational feature.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 5d6f503e2..9ff05c460 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -59,6 +59,8 @@ var actions = {
exportAccount: exportAccount,
SHOW_PRIVATE_KEY: 'SHOW_PRIVATE_KEY',
showPrivateKey: showPrivateKey,
+ SAVE_ACCOUNT_LABEL: 'SAVE_ACCOUNT_LABEL',
+ saveAccountLabel: saveAccountLabel,
// tx conf screen
COMPLETED_TX: 'COMPLETED_TX',
TRANSACTION_ERROR: 'TRANSACTION_ERROR',
@@ -481,6 +483,22 @@ function showPrivateKey(key) {
}
}
+function saveAccountLabel(account, label) {
+ return (dispatch) => {
+ dispatch(this.showLoadingIndication())
+ _accountManager.saveAccountLabel(account, label, (err) => {
+ dispatch(this.hideLoadingIndication())
+ if (err) {
+ return dispatch(this.showWarning(err.message))
+ }
+ dispatch({
+ type: this.SAVE_ACCOUNT_LABEL,
+ value: { account, label },
+ })
+ })
+ }
+}
+
function showSendPage() {
return {
type: this.SHOW_SEND_PAGE,