Use staging fleet and upgrade status-go
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
c69863cda2
commit
5eb314db58
2
.env
2
.env
|
@ -5,7 +5,7 @@ DEV_BUILD=1
|
|||
ERC20_CONTRACT_WARNINGS=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.beta
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
|
|
2
.env.e2e
2
.env.e2e
|
@ -3,7 +3,7 @@ DEFAULT_NETWORK=testnet_rpc
|
|||
ERC20_CONTRACT_WARNINGS=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.beta
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
|
|
|
@ -4,7 +4,7 @@ DEFAULT_NETWORK=mainnet_rpc
|
|||
ERC20_CONTRACT_WARNINGS=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.beta
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
|
|
|
@ -3,7 +3,7 @@ DEFAULT_NETWORK=mainnet_rpc
|
|||
ERC20_CONTRACT_WARNINGS=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.beta
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
|
|
|
@ -3,7 +3,7 @@ DEFAULT_NETWORK=mainnet_rpc
|
|||
ERC20_CONTRACT_WARNINGS=0
|
||||
ETHEREUM_DEV_CLUSTER=0
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.beta
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=
|
||||
LOG_LEVEL=info
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
(defn fetch-nodes [current-fleet resolve reject]
|
||||
(let [default-nodes (-> (node/fleets {})
|
||||
(get-in [:eth.beta :mail])
|
||||
(get-in [:eth.staging :mail])
|
||||
vals)]
|
||||
(if config/contract-nodes-enabled?
|
||||
(do
|
||||
|
@ -47,7 +47,7 @@
|
|||
contract-address
|
||||
(handlers/response-handler resolve
|
||||
(fn [error]
|
||||
(log/warn "could not fetch nodes from contract defaulting to eth.beta")
|
||||
(log/warn "could not fetch nodes from contract defaulting to eth.staging")
|
||||
(resolve default-nodes)))))
|
||||
(resolve default-nodes))))
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
(def log-level-status-go
|
||||
(-> (get-config :LOG_LEVEL_STATUS_GO "")
|
||||
string/upper-case))
|
||||
(def fleet (get-config :FLEET "eth.beta"))
|
||||
(def fleet (get-config :FLEET "eth.staging"))
|
||||
(def default-network (get-config :DEFAULT_NETWORK))
|
||||
(def pow-target (js/parseFloat (get-config :POW_TARGET "0.002")))
|
||||
(def pow-time (js/parseInt (get-config :POW_TIME "1")))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "5f2544f1e8f2ee832bbab95c8d74e26ba0ab2481",
|
||||
"commit-sha1": "5f2544f1e8f2ee832bbab95c8d74e26ba0ab2481",
|
||||
"src-sha256": "0dlkr6056mhyny9k895zs5012ywiz75qm6y7a6hypb3pfxr35931"
|
||||
"version": "v0.34.0-beta.4",
|
||||
"commit-sha1": "e311307061ebf67fece33ff02e811d94972ae5b1",
|
||||
"src-sha256": "063yfb9r1vdgskhfqg0r400wrpwk2ibryc785pffwash70yyf5y0"
|
||||
}
|
||||
|
|
|
@ -40,17 +40,17 @@
|
|||
(testing "it shows the popup"
|
||||
(is (:ui/show-confirmation (mailserver/change-mailserver
|
||||
{:db {:multiaccount {:settings
|
||||
{:fleet :beta
|
||||
:mailserver {:beta "id"}}}
|
||||
{:fleet :staging
|
||||
:mailserver {:staging "id"}}}
|
||||
:peers-count 1}})))))
|
||||
(testing "there's not a preferred mailserver"
|
||||
(testing "it changes the mailserver"
|
||||
(is (= :a
|
||||
(get-in
|
||||
(mailserver/change-mailserver
|
||||
{:db {:mailserver/mailservers {:beta {:a "b"}}
|
||||
{:db {:mailserver/mailservers {:staging {:a "b"}}
|
||||
:multiaccount {:settings
|
||||
{:fleet :beta}}
|
||||
{:fleet :staging}}
|
||||
:peers-count 1}})
|
||||
[:db :mailserver/current-id]))))
|
||||
(testing "it does not show the popup"
|
||||
|
@ -131,7 +131,7 @@
|
|||
|
||||
(deftest edit-mailserver
|
||||
(let [db {:mailserver/mailservers
|
||||
{:eth.beta {"a" {:id "a"
|
||||
{:eth.staging {"a" {:id "a"
|
||||
:address valid-enode-address
|
||||
:password password
|
||||
:name "name"}}}}
|
||||
|
@ -186,7 +186,7 @@
|
|||
|
||||
(deftest fetch-mailserver
|
||||
(testing "it fetches the mailserver from the db"
|
||||
(let [cofx {:db {:mailserver/mailservers {:eth.beta {"a" {:id "a"
|
||||
(let [cofx {:db {:mailserver/mailservers {:eth.staging {"a" {:id "a"
|
||||
:name "old-name"
|
||||
:address "enode://old-id:old-password@url:port"}}}}}]
|
||||
(is (mailserver/fetch cofx "a")))))
|
||||
|
@ -194,28 +194,28 @@
|
|||
(deftest fetch-current-mailserver
|
||||
(testing "it fetches the mailserver from the db with corresponding id"
|
||||
(let [cofx {:db {:mailserver/current-id "a"
|
||||
:mailserver/mailservers {:eth.beta {"a" {:id "a"
|
||||
:mailserver/mailservers {:eth.staging {"a" {:id "a"
|
||||
:name "old-name"
|
||||
:address "enode://old-id:old-password@url:port"}}}}}]
|
||||
(is (mailserver/fetch-current cofx)))))
|
||||
|
||||
(deftest set-current-mailserver
|
||||
(with-redefs [rand-nth (comp last sort)]
|
||||
(let [cofx {:db {:mailserver/mailservers {:eth.beta {"a" {}
|
||||
(let [cofx {:db {:mailserver/mailservers {:eth.staging {"a" {}
|
||||
"b" {}
|
||||
"c" {}
|
||||
"d" {}}}}}]
|
||||
(testing "the user has already a preference"
|
||||
(let [cofx (assoc-in cofx
|
||||
[:db :multiaccount :settings]
|
||||
{:mailserver {:eth.beta "a"}})]
|
||||
{:mailserver {:eth.staging "a"}})]
|
||||
(testing "the mailserver exists"
|
||||
(testing "it sets the preferred mailserver"
|
||||
(is (= "a" (-> (mailserver/set-current-mailserver cofx)
|
||||
:db
|
||||
:mailserver/current-id)))))
|
||||
(testing "the mailserver does not exists"
|
||||
(let [cofx (update-in cofx [:db :mailserver/mailservers :eth.beta] dissoc "a")]
|
||||
(let [cofx (update-in cofx [:db :mailserver/mailservers :eth.staging] dissoc "a")]
|
||||
(testing "sets a random mailserver"
|
||||
(is (= "d" (-> (mailserver/set-current-mailserver cofx)
|
||||
:db
|
||||
|
@ -250,7 +250,7 @@
|
|||
(deftest delete-mailserver
|
||||
(testing "the user is not connected to the mailserver"
|
||||
(let [cofx {:random-id-generator (constantly "random-id")
|
||||
:db {:mailserver/mailservers {:eth.beta {"a" {:id "a"
|
||||
:db {:mailserver/mailservers {:eth.staging {"a" {:id "a"
|
||||
:name "old-name"
|
||||
:user-defined true
|
||||
:address "enode://old-id:old-password@url:port"}}}}}
|
||||
|
@ -261,7 +261,7 @@
|
|||
(is (= 1 (count (::json-rpc/call actual)))))))
|
||||
(testing "the mailserver is not user-defined"
|
||||
(let [cofx {:random-id-generator (constantly "random-id")
|
||||
:db {:mailserver/mailservers {:eth.beta {"a" {:id "a"
|
||||
:db {:mailserver/mailservers {:eth.staging {"a" {:id "a"
|
||||
:name "old-name"
|
||||
:address "enode://old-id:old-password@url:port"}}}}}
|
||||
actual (mailserver/delete cofx "a")]
|
||||
|
@ -269,7 +269,7 @@
|
|||
(is (= {:dispatch [:navigate-back]} actual)))))
|
||||
(testing "the user is connected to the mailserver"
|
||||
(let [cofx {:random-id-generator (constantly "random-id")
|
||||
:db {:mailserver/mailservers {:eth.beta {"a" {:id "a"
|
||||
:db {:mailserver/mailservers {:eth.staging {"a" {:id "a"
|
||||
:name "old-name"
|
||||
:address "enode://old-id:old-password@url:port"}}}}}
|
||||
actual (mailserver/delete cofx "a")]
|
||||
|
@ -286,7 +286,7 @@
|
|||
actual (mailserver/upsert cofx)]
|
||||
|
||||
(testing "it adds the enode to mailserver/mailservers"
|
||||
(is (= {:eth.beta {:randomid {:password "test-password"
|
||||
(is (= {:eth.staging {:randomid {:password "test-password"
|
||||
:address "enode://test-id@url:port"
|
||||
:name "test-name"
|
||||
:id :randomid
|
||||
|
@ -303,7 +303,7 @@
|
|||
:name {:value "new-name"}
|
||||
:url {:value "enode://new-id:new-password@url:port"}}
|
||||
|
||||
:mailserver/mailservers {:eth.beta {:a {:id :a
|
||||
:mailserver/mailservers {:eth.staging {:a {:id :a
|
||||
:name "old-name"
|
||||
:address "enode://old-id:old-password@url:port"}}}}}
|
||||
actual (mailserver/upsert cofx)]
|
||||
|
@ -311,7 +311,7 @@
|
|||
(is (= [:navigate-back]
|
||||
(:dispatch actual))))
|
||||
(testing "it updates the enode to mailserver/mailservers"
|
||||
(is (= {:eth.beta {:a {:password "new-password"
|
||||
(is (= {:eth.staging {:a {:password "new-password"
|
||||
:address "enode://new-id@url:port"
|
||||
:name "new-name"
|
||||
:id :a
|
||||
|
@ -325,9 +325,9 @@
|
|||
:peers-summary (if registered-peer?
|
||||
[{:id "mailserver-id" :enode "enode://mailserver-id@ip"}]
|
||||
[])
|
||||
:multiaccount {:settings {:fleet :eth.beta}}
|
||||
:multiaccount {:settings {:fleet :eth.staging}}
|
||||
:mailserver/current-id "mailserver-a"
|
||||
:mailserver/mailservers {:eth.beta {"mailserver-a" {:sym-key-id sym-key
|
||||
:mailserver/mailservers {:eth.staging {"mailserver-a" {:sym-key-id sym-key
|
||||
:address "enode://mailserver-id@ip"}}}}})
|
||||
|
||||
(defn peers-summary-change-result [sym-key registered-peer? registered-peer-before?]
|
||||
|
@ -581,34 +581,34 @@
|
|||
(testing "it removes the preference"
|
||||
(let [db {:mailserver/current-id "mailserverid"
|
||||
:mailserver/mailservers
|
||||
{:eth.beta {"mailserverid" {:address "mailserver-address"
|
||||
{:eth.staging {"mailserverid" {:address "mailserver-address"
|
||||
:password "mailserver-password"}}}
|
||||
:multiaccount
|
||||
{:settings {:fleet :eth.beta
|
||||
:mailserver {:eth.beta "mailserverid"}}}}]
|
||||
{:settings {:fleet :eth.staging
|
||||
:mailserver {:eth.staging "mailserverid"}}}}]
|
||||
(is (not (get-in (mailserver/unpin {:db db})
|
||||
[:db :multiaccount :settings :mailserver :eth.beta]))))))
|
||||
[:db :multiaccount :settings :mailserver :eth.staging]))))))
|
||||
|
||||
(deftest pin-test
|
||||
(testing "it removes the preference"
|
||||
(let [db {:mailserver/current-id "mailserverid"
|
||||
:mailserver/mailservers
|
||||
{:eth.beta {"mailserverid" {:address "mailserver-address"
|
||||
{:eth.staging {"mailserverid" {:address "mailserver-address"
|
||||
:password "mailserver-password"}}}
|
||||
:multiaccount
|
||||
{:settings {:fleet :eth.beta
|
||||
{:settings {:fleet :eth.staging
|
||||
:mailserver {}}}}]
|
||||
(is (= "mailserverid" (get-in (mailserver/pin {:db db})
|
||||
[:db :multiaccount :settings :mailserver :eth.beta]))))))
|
||||
[:db :multiaccount :settings :mailserver :eth.staging]))))))
|
||||
|
||||
(deftest connect-to-mailserver
|
||||
(let [db {:mailserver/current-id "mailserverid"
|
||||
:mailserver/mailservers
|
||||
{:eth.beta {"mailserverid" {:address "mailserver-address"
|
||||
{:eth.staging {"mailserverid" {:address "mailserver-address"
|
||||
:password "mailserver-password"}}}
|
||||
:multiaccount
|
||||
{:settings {:fleet :eth.beta
|
||||
:mailserver {:eth.beta "mailserverid"}}}}]
|
||||
{:settings {:fleet :eth.staging
|
||||
:mailserver {:eth.staging "mailserverid"}}}}]
|
||||
(testing "it adds the peer"
|
||||
(is (= "mailserver-address"
|
||||
(:mailserver/add-peer (mailserver/connect-to-mailserver {:db db})))))
|
||||
|
@ -619,7 +619,7 @@
|
|||
first
|
||||
:password))))
|
||||
(let [mailserver-with-sym-key-db (assoc-in db
|
||||
[:mailserver/mailservers :eth.beta "mailserverid" :sym-key-id]
|
||||
[:mailserver/mailservers :eth.staging "mailserverid" :sym-key-id]
|
||||
"somesymkeyid")]
|
||||
(testing "it does not generate a sym key if already present"
|
||||
(is (not (-> (mailserver/connect-to-mailserver {:db mailserver-with-sym-key-db})
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
(let [cofx {:db {:multiaccount {:public-key "1"}}}]
|
||||
(testing "custom mailservers"
|
||||
(let [ms-1 {:id :a
|
||||
:fleet :eth.beta
|
||||
:fleet :eth.staging
|
||||
:name "name-1"
|
||||
:address "address-1"
|
||||
:password "password-1"}
|
||||
ms-2 {:id :b
|
||||
:fleet :eth.beta
|
||||
:fleet :eth.staging
|
||||
:name "name-2"
|
||||
:address "address-2"
|
||||
:password "password-2"}
|
||||
|
@ -24,7 +24,7 @@
|
|||
:name "name-3"
|
||||
:address "address-3"
|
||||
:password "password-3"}
|
||||
expected-mailservers {:eth.beta {:a (-> ms-1
|
||||
expected-mailservers {:eth.staging {:a (-> ms-1
|
||||
(dissoc :fleet)
|
||||
(assoc :user-defined true))
|
||||
:b (-> ms-2
|
||||
|
@ -40,8 +40,8 @@
|
|||
:mailserver-topics {}
|
||||
:default-mailserver true})
|
||||
[:db :mailserver/mailservers])
|
||||
(update-in [:eth.beta :a] dissoc :generating-sym-key?)
|
||||
(update-in [:eth.beta :b] dissoc :generating-sym-key?)
|
||||
(update-in [:eth.staging :a] dissoc :generating-sym-key?)
|
||||
(update-in [:eth.staging :b] dissoc :generating-sym-key?)
|
||||
(update-in [:eth.test :c] dissoc :generating-sym-key?))))))))
|
||||
|
||||
(def sig "0x04325367620ae20dd878dbb39f69f02c567d789dd21af8a88623dc5b529827c2812571c380a2cd8236a2851b8843d6486481166c39debf60a5d30b9099c66213e4")
|
||||
|
|
Loading…
Reference in New Issue