fixed to=nil in transactions

Signed-off-by: Eric Dvorsak <eric@dvorsak.fr>
This commit is contained in:
Andrey Shovkoplyas 2018-04-11 13:32:11 +03:00 committed by Eric Dvorsak
parent a8a03067a1
commit ad5539addd
No known key found for this signature in database
GPG Key ID: 932AC1CE5F05DE0C
3 changed files with 15 additions and 10 deletions

View File

@ -24,8 +24,6 @@
(def default-network config/default-network) (def default-network config/default-network)
(def contract-address "0x0000000000000000000000000000000000000000")
(def system "system") (def system "system")
(def default-wallet-transactions (def default-wallet-transactions

View File

@ -108,7 +108,7 @@
transaction {:id id transaction {:id id
:from from :from from
:to to :to to
:to-name (when (= to constants/contract-address) :to-name (when (nil? to)
(i18n/label :t/new-contract)) (i18n/label :t/new-contract))
:symbol symbol :symbol symbol
:value (money/bignumber (or value 0)) :value (money/bignumber (or value 0))

View File

@ -82,9 +82,9 @@
(not (nil? amount)))) (not (nil? amount))))
;; "Sign Later" and "Sign Transaction >" buttons ;; "Sign Later" and "Sign Transaction >" buttons
(defn- sign-buttons [amount-error to amount sufficient-funds? sign-later-handler] (defn- sign-buttons [amount-error to amount sufficient-funds? sign-later-handler modal?]
(let [sign-enabled? (sign-enabled? amount-error to amount) (let [sign-enabled? (sign-enabled? amount-error to amount)
immediate-sign-enabled? (and sign-enabled? sufficient-funds?)] immediate-sign-enabled? (or modal? (and sign-enabled? sufficient-funds?))]
[bottom-buttons/bottom-buttons [bottom-buttons/bottom-buttons
styles/sign-buttons styles/sign-buttons
(when sign-enabled? (when sign-enabled?
@ -224,10 +224,17 @@
[signing-buttons [signing-buttons
#(re-frame/dispatch (if modal? [:wallet/cancel-signing-modal] [:wallet/discard-transaction])) #(re-frame/dispatch (if modal? [:wallet/cancel-signing-modal] [:wallet/discard-transaction]))
#(re-frame/dispatch (if modal? [:wallet/sign-transaction-modal] [:wallet/sign-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-buttons
#(sign-later-popup true) amount-error
#(re-frame/dispatch [:navigate-back])) to
#(sign-later-popup false))]) amount
sufficient-funds?
(if modal?
(if from-chat?
#(sign-later-popup true)
#(re-frame/dispatch [:navigate-back]))
#(sign-later-popup false))
modal?])
(when signing? (when signing?
[sign-panel]) [sign-panel])
(when in-progress? [react/view styles/processing-view])]])) (when in-progress? [react/view styles/processing-view])]]))