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 contract-address "0x0000000000000000000000000000000000000000")
(def system "system")
(def default-wallet-transactions

View File

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

View File

@ -82,9 +82,9 @@
(not (nil? amount))))
;; "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)
immediate-sign-enabled? (and sign-enabled? sufficient-funds?)]
immediate-sign-enabled? (or modal? (and sign-enabled? sufficient-funds?))]
[bottom-buttons/bottom-buttons
styles/sign-buttons
(when sign-enabled?
@ -224,10 +224,17 @@
[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-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))])
#(sign-later-popup false))
modal?])
(when signing?
[sign-panel])
(when in-progress? [react/view styles/processing-view])]]))