Skip to content

Commit ad1a310

Browse files
goranjovicjeluard
authored andcommitted
bug #4917 and #4914 - not showing message in chat after wallet send
Signed-off-by: Julien Eluard <[email protected]>
1 parent 5935d29 commit ad1a310

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/status_im/ui/screens/wallet/send/events.cljs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
::transaction-completed
278278
(fn [{db :db now :now} [_ {:keys [id response] :as params} modal?]]
279279
(let [{:keys [hash error]} response
280-
{:keys [method]} (get-in db [:wallet :send-transaction])
280+
{:keys [method from-chat?]} (get-in db [:wallet :send-transaction])
281281
db' (assoc-in db [:wallet :send-transaction :in-progress?] false)]
282282
(if (and error (string? error) (not (string/blank? error))) ;; ignore error here, error will be handled in :transaction-failed
283283
{:db db'}
@@ -289,11 +289,17 @@
289289
(update-in [:wallet :transactions-unsigned] dissoc id)
290290
true
291291
(update-in [:wallet :send-transaction] merge clear-send-properties {:tx-hash hash}))}
292-
(if modal?
292+
(cond
293+
modal?
293294
(cond-> {:dispatch [:navigate-back]}
294295
(= method constants/web3-send-transaction)
295296
(assoc :dispatch-later [{:ms 400 :dispatch [:navigate-to-modal :wallet-transaction-sent-modal]}]))
296-
{:dispatch [:execute-stored-command]}))))))
297+
298+
from-chat?
299+
{:dispatch [:execute-stored-command]}
300+
301+
:else
302+
{:dispatch [:navigation-replace :wallet-transaction-sent]}))))))
297303

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

0 commit comments

Comments
 (0)