Skip to content

Commit

Permalink
Revert "[#8107] Wallet balance is not updated when transaction is rec…
Browse files Browse the repository at this point in the history
…eived"

This reverts commit f3b6f98.
  • Loading branch information
yenda committed May 14, 2019
1 parent 969b18e commit 17d8ee1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
6 changes: 1 addition & 5 deletions src/status_im/ui/screens/wallet/main/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@
[react/scroll-view {:end-fill-color colors/white
:refresh-control
(reagent/as-element
[react/refresh-control {:on-refresh (fn [_]
;;TODO temporay fix to update balance, should be fixed
;;properly later
(re-frame/dispatch [:wallet.ui/pull-to-refresh])
(re-frame/dispatch [:update-wallet]))
[react/refresh-control {:on-refresh #(re-frame/dispatch [:wallet.ui/pull-to-refresh])
:tint-color :white
:refreshing false}])}
(if error-message
Expand Down
13 changes: 1 addition & 12 deletions src/status_im/ui/screens/wallet/navigation.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,16 @@
(:require [re-frame.core :as re-frame]
[status-im.ui.screens.navigation :as navigation]
[status-im.utils.ethereum.core :as ethereum]
[status-im.constants :as constants]
[status-im.utils.utils :as utils]))
[status-im.constants :as constants]))

(defmethod navigation/preload-data! :wallet
[db _]
;;TODO(goranjovic) - get rid of this preload hook completely
;;TODO(andrey) - temporary "improvement" with timeout, to fix screen rendering, wallet update should be optimized
(utils/set-timeout (fn []
(re-frame/dispatch [:wallet.ui/pull-to-refresh])
(re-frame/dispatch [:update-wallet]))
500)
(assoc-in db [:wallet :current-tab] 0))

(defmethod navigation/preload-data! :wallet-stack
[db _]
;;TODO(goranjovic) - get rid of this preload hook completely
;;TODO(andrey) - temporary "improvement" with timeout, to fix screen rendering, wallet update should be optimized
(utils/set-timeout (fn []
(re-frame/dispatch [:wallet.ui/pull-to-refresh])
(re-frame/dispatch [:update-wallet]))
500)
(assoc-in db [:wallet :current-tab] 0))

(defmethod navigation/preload-data! :transactions-history
Expand Down
4 changes: 1 addition & 3 deletions src/status_im/ui/screens/wallet/transactions/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
[status-im.utils.money :as money]
[status-im.utils.ethereum.tokens :as tokens]
[status-im.utils.ethereum.core :as ethereum]
[status-im.ui.screens.wallet.utils :as wallet.utils]
[status-im.utils.utils :as utils]))
[status-im.ui.screens.wallet.utils :as wallet.utils]))

(defn history-action [filter?]
(cond->
Expand Down Expand Up @@ -263,4 +262,3 @@
[details-confirmations confirmations confirmations-progress type]
[react/view {:style styles/details-separator}]
[details-list transaction]]]))

0 comments on commit 17d8ee1

Please sign in to comment.