diff --git a/src/status_im/constants.cljs b/src/status_im/constants.cljs index c89b33b9f5..8b4113e886 100644 --- a/src/status_im/constants.cljs +++ b/src/status_im/constants.cljs @@ -24,8 +24,6 @@ (def default-network config/default-network) -(def contract-address "0x0000000000000000000000000000000000000000") - (def system "system") (def default-wallet-transactions diff --git a/src/status_im/ui/screens/wallet/send/events.cljs b/src/status_im/ui/screens/wallet/send/events.cljs index 02bcb89cd6..ca31d6cbcd 100644 --- a/src/status_im/ui/screens/wallet/send/events.cljs +++ b/src/status_im/ui/screens/wallet/send/events.cljs @@ -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)) diff --git a/src/status_im/ui/screens/wallet/send/views.cljs b/src/status_im/ui/screens/wallet/send/views.cljs index 9a43c0f124..884923c2c7 100644 --- a/src/status_im/ui/screens/wallet/send/views.cljs +++ b/src/status_im/ui/screens/wallet/send/views.cljs @@ -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] - (let [sign-enabled? (sign-enabled? amount-error to amount) - immediate-sign-enabled? (and sign-enabled? sufficient-funds?)] +(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? (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-later-popup true) - #(re-frame/dispatch [:navigate-back])) - #(sign-later-popup false))]) + [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?]) (when signing? [sign-panel]) (when in-progress? [react/view styles/processing-view])]]))