[#4754] discard transaction if transaction's modal is closed before sending transaction

This commit is contained in:
Roman Volosovskyi 2018-06-14 13:05:50 +03:00
parent c1120119b2
commit 0dd5c11b47
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 9 additions and 1 deletions

View File

@ -116,7 +116,15 @@
[view common-styles/modal
[modal {:animation-type :slide
:transparent true
:on-request-close #(dispatch [:navigate-back])}
:on-request-close (fn []
(cond
(#{:wallet-send-transaction-modal
:wallet-transaction-fee}
modal-view)
(dispatch [:wallet/discard-transaction-navigate-back])
:else
(dispatch [:navigate-back])))}
(let [component (get-modal-component modal-view)]
[react/main-screen-modal-view modal-view
[component]])]])))