From 780efc3ac17eb6e8614eae803db1d07beb31ae9b Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Thu, 19 Oct 2017 12:34:59 +0300 Subject: [PATCH] added transaction sent modal --- src/status_im/ui/screens/views.cljs | 3 ++- src/status_im/ui/screens/wallet/send/events.cljs | 2 +- .../ui/screens/wallet/send/transaction_sent/views.cljs | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/status_im/ui/screens/views.cljs b/src/status_im/ui/screens/views.cljs index 7ee67f066c..1468eda631 100644 --- a/src/status_im/ui/screens/views.cljs +++ b/src/status_im/ui/screens/views.cljs @@ -40,7 +40,7 @@ [status-im.ui.screens.wallet.request.views :refer [request-transaction]] [status-im.ui.screens.wallet.wallet-list.views :refer [wallet-list-screen]] [status-im.ui.screens.wallet.transactions.views :as wallet-transactions] - [status-im.ui.screens.wallet.send.transaction-sent.views :refer [transaction-sent]] + [status-im.ui.screens.wallet.send.transaction-sent.views :refer [transaction-sent transaction-sent-modal]] [status-im.components.status-bar :as status-bar] @@ -123,5 +123,6 @@ :contact-list-modal contact-list-modal :wallet-transactions-filter wallet-transactions/filter-history :wallet-send-transaction-modal send-transaction-modal + :wallet-transaction-sent-modal transaction-sent-modal (throw (str "Unknown modal view: " modal-view)))] [component])]])]]))))) diff --git a/src/status_im/ui/screens/wallet/send/events.cljs b/src/status_im/ui/screens/wallet/send/events.cljs index 8a548b924e..9fdafc91db 100644 --- a/src/status_im/ui/screens/wallet/send/events.cljs +++ b/src/status_im/ui/screens/wallet/send/events.cljs @@ -148,7 +148,7 @@ (update-in [:wallet :send-transaction] merge clear-send-properties))} (if modal? {:dispatch-n [[:navigate-back] - [:navigate-to :wallet-transaction-sent]]} + [:navigate-to-modal :wallet-transaction-sent-modal]]} {:dispatch [:navigate-to :wallet-transaction-sent]})))))) (defn on-transactions-modal-completed [raw-results] diff --git a/src/status_im/ui/screens/wallet/send/transaction_sent/views.cljs b/src/status_im/ui/screens/wallet/send/transaction_sent/views.cljs index 402fbdeaf2..ddca0ae110 100644 --- a/src/status_im/ui/screens/wallet/send/transaction_sent/views.cljs +++ b/src/status_im/ui/screens/wallet/send/transaction_sent/views.cljs @@ -11,10 +11,10 @@ [status-im.i18n :as i18n] [status-im.utils.platform :as platform])) -(defview transaction-sent [] +(defview transaction-sent [& [modal?]] (letsubs [close-transaction-screen-event [:wallet.sent/close-transaction-screen-event]] [react/view wallet.styles/wallet-modal-container - [status-bar/status-bar {:type :transparent}] + [status-bar/status-bar {:type (if modal? :modal-wallet :transparent)}] [react/view styles/transaction-sent-container [react/view styles/ok-icon-container [vi/icon :icons/ok {:color components.styles/color-blue4}]] @@ -38,3 +38,6 @@ :font (if platform/android? :medium :default) :uppercase? (get-in platform/platform-specific [:uppercase?])} (i18n/label :t/got-it)]]]])) + +(defview transaction-sent-modal [] + [transaction-sent true])