[Fix] Currency symbol on recovered profile (#18433)
This commit fixes the currency symbol not shown on the recovered profile. -- Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
parent
e871357b67
commit
5926426672
|
@ -51,3 +51,9 @@
|
||||||
(visibility-status-updates/<-rpc-settings)
|
(visibility-status-updates/<-rpc-settings)
|
||||||
(set/rename-keys {:compressedKey :compressed-key
|
(set/rename-keys {:compressedKey :compressed-key
|
||||||
:emojiHash :emoji-hash})))
|
:emojiHash :emoji-hash})))
|
||||||
|
|
||||||
|
(defn rpc->setting-value
|
||||||
|
[{:keys [name] :as setting}]
|
||||||
|
(condp = name
|
||||||
|
:currency (update setting :value keyword)
|
||||||
|
setting))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(ns status-im.contexts.profile.events
|
(ns status-im.contexts.profile.events
|
||||||
(:require
|
(:require
|
||||||
|
[legacy.status-im.data-store.settings :as data-store.settings]
|
||||||
[native-module.core :as native-module]
|
[native-module.core :as native-module]
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]
|
||||||
[status-im.contexts.profile.edit.name.events]
|
[status-im.contexts.profile.edit.name.events]
|
||||||
|
@ -52,8 +53,10 @@
|
||||||
|
|
||||||
(rf/defn update-setting-from-backup
|
(rf/defn update-setting-from-backup
|
||||||
{:events [:profile/update-setting-from-backup]}
|
{:events [:profile/update-setting-from-backup]}
|
||||||
[{:keys [db]} {{:keys [name value]} :backedUpSettings}]
|
[{:keys [db]} {:keys [backedUpSettings]}]
|
||||||
{:db (assoc-in db [:profile/profile (keyword name)] value)})
|
(let [setting (update backedUpSettings :name keyword)
|
||||||
|
{:keys [name value]} (data-store.settings/rpc->setting-value setting)]
|
||||||
|
{:db (assoc-in db [:profile/profile name] value)}))
|
||||||
|
|
||||||
(rf/defn update-profile-from-backup
|
(rf/defn update-profile-from-backup
|
||||||
{:events [:profile/update-profile-from-backup]}
|
{:events [:profile/update-profile-from-backup]}
|
||||||
|
|
Loading…
Reference in New Issue