Skip to content

Commit

Permalink
[#6402]: "div() not a number: null" error after connecting to Ropsten…
Browse files Browse the repository at this point in the history
… and opening Wallet

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
  • Loading branch information
alwx authored and jeluard committed Oct 19, 2018
1 parent fe720cb commit 50ab43d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/status_im/network/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
(accounts.update/account-update
{:network network-id
:last-updated now}
{}))
{:success-event [:accounts.update.callback/save-settings-success]}))
(fx/merge cofx
{:ui/show-confirmation {:title (i18n/label :t/close-app-title)
:content (i18n/label :t/close-app-content)
Expand All @@ -136,13 +136,16 @@
:id 1})
:opts {:headers {"Content-Type" "application/json"}}
:success-event-creator (fn [{:keys [response-body]}]
(let [client-version (:result (http/parse-payload response-body))]
(if-let [client-version (:result (http/parse-payload response-body))]
[::connect-success {:network-id network-id
:on-success on-success
:client-version client-version}]))
:client-version client-version}]
[::connect-failure {:network-id network-id
:on-failure on-failure
:reason (i18n/label :t/network-invalid-url)}]))
:failure-event-creator (fn [{:keys [response-body status-code]}]
(let [reason (if status-code
(str "Got a wrong status code: " status-code)
(i18n/label :t/network-invalid-status-code {:code status-code})
(str response-body))]
[::connect-failure {:network-id network-id
:on-failure on-failure
Expand Down
6 changes: 4 additions & 2 deletions src/status_im/ui/screens/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
:new-public-chat new-public-chat
:open-dapp open-dapp
:dapp-description dapp-description
:browser browser}
:browser browser
:login login}
:config
{:headerMode "none"
:initialRouteName "home"}}
Expand Down Expand Up @@ -237,7 +238,8 @@
:config {:headerMode "none"}}
:unsigned-transactions wallet-transactions/transactions
:transactions-history wallet-transactions/transactions
:wallet-transaction-details wallet-transactions/transaction-details})
:wallet-transaction-details wallet-transactions/transaction-details
:login login})
{:headerMode "none"
:initialRouteName "wallet"})}
:wallet-settings-assets
Expand Down
4 changes: 3 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,5 +752,7 @@
"share-link": "Share link",
"share-profile-link": "Share profile link",
"share-public-chat-text": "Check out this public chat on the Status app: {{link}}",
"share-dapp-text": "Check out this DApp I'm using on Status: {{link}}"
"share-dapp-text": "Check out this DApp I'm using on Status: {{link}}",
"network-invalid-url": "Network URL is invalid",
"network-invalid-status-code": "Invalid status code: {{code}}"
}

0 comments on commit 50ab43d

Please sign in to comment.