Skip to content

Commit

Permalink
Add settings and stickers synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
audriu committed May 11, 2022
1 parent 54c3030 commit 8f6b797
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ local.properties
# VS Code
.vscode/ipch/
.vscode/settings.json
workspace.code-workspace

# node.js
#
Expand Down
13 changes: 11 additions & 2 deletions src/status_im/multiaccounts/update/core.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(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]
[taoensso.timbre :as log]))

Expand Down Expand Up @@ -42,7 +43,15 @@

(fx/defn optimistic
[{: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
(assoc-in db [:multiaccount setting] setting-value)
(update db :multiaccount dissoc setting))}))
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.98.6",
"commit-sha1": "0048aaebcc7859a6f0dd7cdf0266fe029f3066fc",
"src-sha256": "1px3ddfbpnlqyzkbp8v4bb8dh5f69cx4lwif8vspw60rr4gpppys"
"version": "6e9aaa5a217caa80f091446763eed47625e67684",
"commit-sha1": "6e9aaa5a217caa80f091446763eed47625e67684",
"src-sha256": "0dzz4zjqsv61jy46j76v60vn53z9j0724splyv4q1sww5azdn8q0"
}

0 comments on commit 8f6b797

Please sign in to comment.