bug #5975 - navigating back to chat after chat initiated transaction
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
parent
34f8031d9f
commit
77b4dafe3e
|
@ -2,6 +2,7 @@
|
||||||
(:require [re-frame.core :as re-frame]
|
(:require [re-frame.core :as re-frame]
|
||||||
[status-im.chat.commands.sending :as commands-sending]
|
[status-im.chat.commands.sending :as commands-sending]
|
||||||
[status-im.chat.models.message :as models.message]
|
[status-im.chat.models.message :as models.message]
|
||||||
|
[status-im.chat.models :as chat.models]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[status-im.i18n :as i18n]
|
[status-im.i18n :as i18n]
|
||||||
[status-im.models.transactions :as wallet.transactions]
|
[status-im.models.transactions :as wallet.transactions]
|
||||||
|
@ -260,12 +261,17 @@
|
||||||
cofx)
|
cofx)
|
||||||
:dispatch [:wallet/update-gas-price true]))))
|
:dispatch [:wallet/update-gas-price true]))))
|
||||||
|
|
||||||
|
(fx/defn navigate-after-transaction [{:keys [db] :as cofx} chat-id]
|
||||||
|
(if (= :wallet-send-transaction-modal (second (:navigation-stack db)))
|
||||||
|
(chat.models/navigate-to-chat cofx chat-id {})
|
||||||
|
(navigation/navigate-back cofx)))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:close-transaction-sent-screen
|
:close-transaction-sent-screen
|
||||||
(fn [{:keys [db] :as cofx} [_ chat-id]]
|
(fn [cofx [_ chat-id]]
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:dispatch-later [{:ms 400 :dispatch [:check-dapps-transactions-queue]}]}
|
{:dispatch-later [{:ms 400 :dispatch [:check-dapps-transactions-queue]}]}
|
||||||
(navigation/navigate-back))))
|
(navigate-after-transaction chat-id))))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:sync-wallet-transactions
|
:sync-wallet-transactions
|
||||||
|
|
Loading…
Reference in New Issue