Dont use json-string in network config
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
5ee356fe4f
commit
638b30c443
|
@ -15,8 +15,7 @@
|
|||
:URL upstream-url}}]
|
||||
{:id (string/replace random-id "-" "")
|
||||
:name network-name
|
||||
:config (types/clj->json config)
|
||||
:raw-config config}))
|
||||
:config config}))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:save-new-network
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
[status-im.test.utils.async]
|
||||
[status-im.test.utils.datetime]
|
||||
[status-im.test.utils.mixpanel]
|
||||
[status-im.test.utils.prices]))
|
||||
[status-im.test.utils.prices]
|
||||
[status-im.test.ui.screens.network-settings.edit-network.events]))
|
||||
|
||||
(enable-console-print!)
|
||||
|
||||
|
@ -79,4 +80,5 @@
|
|||
'status-im.test.utils.transducers
|
||||
'status-im.test.utils.datetime
|
||||
'status-im.test.utils.mixpanel
|
||||
'status-im.test.utils.prices)
|
||||
'status-im.test.utils.prices
|
||||
'status-im.test.ui.screens.network-settings.edit-network.events)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
(ns status-im.test.ui.screens.network-settings.edit-network.events
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im.ui.screens.network-settings.edit-network.events :as events]))
|
||||
|
||||
(deftest new-network
|
||||
(let [actual (events/new-network {:random-id "random-id"}
|
||||
"network-name"
|
||||
"upstream-url"
|
||||
:mainnet)]
|
||||
(is (= {:id "randomid"
|
||||
:name "network-name"
|
||||
:config {:NetworkId 1
|
||||
:DataDir "/ethereum/mainnet_rpc"
|
||||
:UpstreamConfig {:Enabled true
|
||||
:URL "upstream-url"}}}
|
||||
actual))))
|
Loading…
Reference in New Issue