Skip to content

Commit

Permalink
bug #4917 and #4914 - not showing message in chat after wallet send
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Eluard <[email protected]>
  • Loading branch information
goranjovic authored and jeluard committed Jun 25, 2018
1 parent 9883321 commit 25c4177
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/status_im/ui/screens/wallet/send/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
::transaction-completed
(fn [{db :db now :now} [_ {:keys [id response] :as params} modal?]]
(let [{:keys [hash error]} response
{:keys [method]} (get-in db [:wallet :send-transaction])
{:keys [method from-chat?]} (get-in db [:wallet :send-transaction])
db' (assoc-in db [:wallet :send-transaction :in-progress?] false)]
(if (and error (string? error) (not (string/blank? error))) ;; ignore error here, error will be handled in :transaction-failed
{:db db'}
Expand All @@ -289,11 +289,17 @@
(update-in [:wallet :transactions-unsigned] dissoc id)
true
(update-in [:wallet :send-transaction] merge clear-send-properties {:tx-hash hash}))}
(if modal?
(cond
modal?
(cond-> {:dispatch [:navigate-back]}
(= method constants/web3-send-transaction)
(assoc :dispatch-later [{:ms 400 :dispatch [:navigate-to-modal :wallet-transaction-sent-modal]}]))
{:dispatch [:execute-stored-command]}))))))

from-chat?
{:dispatch [:execute-stored-command]}

:else
{:dispatch [:navigation-replace :wallet-transaction-sent]}))))))

(defn on-transactions-modal-completed [raw-results]
(let [result (types/json->clj raw-results)]
Expand Down

0 comments on commit 25c4177

Please sign in to comment.