aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorJason Clark <jason@longview.tech>2017-11-25 01:35:17 +0800
committerJason Clark <jason@longview.tech>2017-11-25 01:35:17 +0800
commitfc46a16a329df296cb565e3a0b04f268d2aeceb5 (patch)
treeba5d45f1ad2f5b3a5f0fb4deb82cbf889b737612 /ui/app/actions.js
parent90fc4812bc75857581e56eb6d63484dbc5c48cb1 (diff)
downloadtangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.gz
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.bz2
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.lz
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.xz
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.tar.zst
tangerine-wallet-browser-fc46a16a329df296cb565e3a0b04f268d2aeceb5.zip
toggle wired up to preferences property store
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 957e42223..2819742e5 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -235,8 +235,8 @@ var actions = {
useEtherscanProvider,
- TOGGLE_USE_BLOCKIE: 'TOGGLE_USE_BLOCKIE',
- toggleUseBlockie,
+ SET_USE_BLOCKIE: 'SET_USE_BLOCKIE',
+ setUseBlockie,
}
module.exports = actions
@@ -1554,8 +1554,19 @@ function toggleAccountMenu () {
}
}
-function toggleUseBlockie () {
- return {
- type: actions.TOGGLE_USE_BLOCKIE,
+function setUseBlockie (val) {
+ return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
+ log.debug(`background.setUseBlockie`)
+ background.setUseBlockie(val, (err) => {
+ dispatch(actions.hideLoadingIndication())
+ if (err) {
+ return dispatch(actions.displayWarning(err.message))
+ }
+ })
+ dispatch({
+ type: actions.SET_USE_BLOCKIE,
+ value: val
+ })
}
-}
+} \ No newline at end of file