Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
parent
5935d29d7d
commit
ad1a31073e
|
@ -277,7 +277,7 @@
|
||||||
::transaction-completed
|
::transaction-completed
|
||||||
(fn [{db :db now :now} [_ {:keys [id response] :as params} modal?]]
|
(fn [{db :db now :now} [_ {:keys [id response] :as params} modal?]]
|
||||||
(let [{:keys [hash error]} response
|
(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)]
|
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
|
(if (and error (string? error) (not (string/blank? error))) ;; ignore error here, error will be handled in :transaction-failed
|
||||||
{:db db'}
|
{:db db'}
|
||||||
|
@ -289,11 +289,17 @@
|
||||||
(update-in [:wallet :transactions-unsigned] dissoc id)
|
(update-in [:wallet :transactions-unsigned] dissoc id)
|
||||||
true
|
true
|
||||||
(update-in [:wallet :send-transaction] merge clear-send-properties {:tx-hash hash}))}
|
(update-in [:wallet :send-transaction] merge clear-send-properties {:tx-hash hash}))}
|
||||||
(if modal?
|
(cond
|
||||||
|
modal?
|
||||||
(cond-> {:dispatch [:navigate-back]}
|
(cond-> {:dispatch [:navigate-back]}
|
||||||
(= method constants/web3-send-transaction)
|
(= method constants/web3-send-transaction)
|
||||||
(assoc :dispatch-later [{:ms 400 :dispatch [:navigate-to-modal :wallet-transaction-sent-modal]}]))
|
(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]
|
(defn on-transactions-modal-completed [raw-results]
|
||||||
(let [result (types/json->clj raw-results)]
|
(let [result (types/json->clj raw-results)]
|
||||||
|
|
Loading…
Reference in New Issue