mirror of
https://github.com/status-im/status-mobile.git
synced 2025-03-02 17:20:48 +00:00
Allow importing db from script
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
65d76ba9c8
commit
8926a7ad4e
@ -1,11 +1,15 @@
|
|||||||
(ns status-im.data-store.settings
|
(ns status-im.data-store.settings
|
||||||
(:require [status-im.ethereum.eip55 :as eip55]))
|
(:require
|
||||||
|
[status-im.utils.config :as config]
|
||||||
|
[status-im.ethereum.eip55 :as eip55]))
|
||||||
|
|
||||||
(defn rpc->networks [networks]
|
(defn rpc->networks [networks]
|
||||||
(reduce (fn [acc {:keys [id] :as network}]
|
(reduce (fn [acc {:keys [id] :as network}]
|
||||||
(assoc acc id network))
|
(assoc acc id network))
|
||||||
{}
|
{}
|
||||||
networks))
|
(if (seq networks)
|
||||||
|
networks
|
||||||
|
config/default-networks)))
|
||||||
|
|
||||||
(defn rpc->visible-tokens [visible-tokens]
|
(defn rpc->visible-tokens [visible-tokens]
|
||||||
(reduce-kv (fn [acc chain visible-tokens]
|
(reduce-kv (fn [acc chain visible-tokens]
|
||||||
@ -36,6 +40,9 @@
|
|||||||
(update :dapps-address eip55/address->checksum)
|
(update :dapps-address eip55/address->checksum)
|
||||||
(update :address eip55/address->checksum)
|
(update :address eip55/address->checksum)
|
||||||
(update :networks/networks rpc->networks)
|
(update :networks/networks rpc->networks)
|
||||||
|
(update :networks/current-network #(if (seq %)
|
||||||
|
%
|
||||||
|
config/default-network))
|
||||||
(update :wallet/visible-tokens rpc->visible-tokens)
|
(update :wallet/visible-tokens rpc->visible-tokens)
|
||||||
(update :pinned-mailservers rpc->pinned-mailservers)
|
(update :pinned-mailservers rpc->pinned-mailservers)
|
||||||
(update :stickers/packs-installed rpc->stickers-packs)
|
(update :stickers/packs-installed rpc->stickers-packs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user