Add settings and stickers synchronization
640793fe85...a244d77657
Signed-off-by: Audrius Molis <masta@dr.com>
This commit is contained in:
parent
09d393dabe
commit
4909ec9854
|
@ -41,6 +41,7 @@ local.properties
|
||||||
# VS Code
|
# VS Code
|
||||||
.vscode/ipch/
|
.vscode/ipch/
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
workspace.code-workspace
|
||||||
|
|
||||||
# node.js
|
# node.js
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(ns status-im.multiaccounts.update.core
|
(ns status-im.multiaccounts.update.core
|
||||||
(:require [status-im.ethereum.json-rpc :as json-rpc]
|
(:require [status-im.constants :as constants]
|
||||||
|
[status-im.ethereum.json-rpc :as json-rpc]
|
||||||
[status-im.utils.fx :as fx]
|
[status-im.utils.fx :as fx]
|
||||||
[taoensso.timbre :as log]))
|
[taoensso.timbre :as log]))
|
||||||
|
|
||||||
|
@ -42,7 +43,15 @@
|
||||||
|
|
||||||
(fx/defn optimistic
|
(fx/defn optimistic
|
||||||
[{:keys [db] :as cofx} setting setting-value]
|
[{:keys [db] :as cofx} setting setting-value]
|
||||||
(let [current-multiaccount (:multiaccount db)]
|
(let [current-multiaccount (:multiaccount db)
|
||||||
|
setting-value (if (= :currency setting)
|
||||||
|
(keyword setting-value)
|
||||||
|
setting-value)
|
||||||
|
db (if (= :stickers/packs-installed setting)
|
||||||
|
;;updating :stickers/packs for installed stickers
|
||||||
|
(let [packs-installed-keys (keys (js->clj setting-value))]
|
||||||
|
(reduce #(assoc-in %1 [:stickers/packs %2 :status] constants/sticker-pack-status-installed) db packs-installed-keys))
|
||||||
|
db)]
|
||||||
{:db (if setting-value
|
{:db (if setting-value
|
||||||
(assoc-in db [:multiaccount setting] setting-value)
|
(assoc-in db [:multiaccount setting] setting-value)
|
||||||
(update db :multiaccount dissoc setting))}))
|
(update db :multiaccount dissoc setting))}))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.98.6",
|
"version": "a244d776571cc73ea34d7a700cc5db36166ce832",
|
||||||
"commit-sha1": "0048aaebcc7859a6f0dd7cdf0266fe029f3066fc",
|
"commit-sha1": "a244d776571cc73ea34d7a700cc5db36166ce832",
|
||||||
"src-sha256": "1px3ddfbpnlqyzkbp8v4bb8dh5f69cx4lwif8vspw60rr4gpppys"
|
"src-sha256": "1v057jy565y9178ja8j9j6sg04z83y7a0bnry6ziy9zf2zda7nkg"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue