bug #4539 - error message for failed transactions sent from chat

This commit is contained in:
Goran Jovic 2018-05-31 12:19:32 +02:00 committed by Roman Volosovskyi
parent 5d41cdda0c
commit 434324d5fc
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 3 additions and 21 deletions

View File

@ -191,6 +191,7 @@
(defn this-transaction-signing? [id signing-id view-id modal]
(and (= signing-id id)
(or (= view-id :wallet-send-transaction)
(= view-id :wallet-send-transaction-chat)
(= modal :wallet-send-transaction-modal)
(= modal :wallet-sign-message-modal))))

View File

@ -27,15 +27,6 @@
[status-im.utils.ethereum.core :as ethereum]
[clojure.string :as string]))
(defn sign-later-popup
[from-chat?]
(utils/show-question
(i18n/label :t/sign-later-title)
(i18n/label :t/sign-later-text)
#(re-frame/dispatch (if from-chat?
[:sign-later-from-chat]
[:wallet/sign-transaction true]))))
(defview sign-panel [message?]
(letsubs [account [:get-current-account]
wrong-password? [:wallet.send/wrong-password?]
@ -87,7 +78,7 @@
(not (nil? amount))))
;; "Sign Later" and "Sign Transaction >" buttons
(defn- sign-buttons [amount-error to amount sufficient-funds? sign-later-handler modal?]
(defn- sign-buttons [amount-error to amount sufficient-funds? modal?]
(let [sign-enabled? (sign-enabled? amount-error to amount)
immediate-sign-enabled? (or modal? (and sign-enabled? sufficient-funds?))]
[bottom-buttons/bottom-buttons
@ -247,17 +238,7 @@
[signing-buttons
#(re-frame/dispatch (if modal? [:wallet/cancel-signing-modal] [:wallet/discard-transaction]))
#(re-frame/dispatch (if modal? [:wallet/sign-transaction-modal] [:wallet/sign-transaction]))]
[sign-buttons
amount-error
to
amount
sufficient-funds?
(if modal?
(if from-chat?
#(sign-later-popup true)
#(re-frame/dispatch [:navigate-back]))
#(sign-later-popup false))
modal?])
[sign-buttons amount-error to amount sufficient-funds? modal?])
(when signing?
[sign-panel])
(when in-progress? [react/view styles/processing-view])]]))