Skip to content

Commit

Permalink
use 'next' label when sending transaction requires a sign
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Mar 12, 2020
1 parent 4f95e0b commit 285ad24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/status_im/ui/screens/wallet/send/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
[status-im.ui.screens.wallet.send.sheets :as sheets]
[status-im.ui.screens.wallet.components.views :as components]
[status-im.utils.utils :as utils]
[status-im.ui.components.button :as button]))
[status-im.ui.components.button :as button]
[status-im.ethereum.core :as ethereum]))

(defn header [{:keys [label small-screen? on-cancel]}]
[react/view (styles/header small-screen?)
Expand Down Expand Up @@ -89,7 +90,8 @@
[:wallet.send/prepare-transaction-with-balance]
window-height [:dimensions/window-height]
keyboard-height [:keyboard-height]]
(let [small-screen? (< (- window-height keyboard-height) 450)]
(let [small-screen? (< (- window-height keyboard-height) 450)
to-norm (ethereum/normalized-hex (if (string? to) to (:address to)))]
[react/view {:style (styles/sheet small-screen?)}
[header {:small-screen? small-screen?
:on-cancel #(re-frame/dispatch [:wallet/cancel-transaction-command])}]
Expand Down Expand Up @@ -130,7 +132,7 @@
[render-contact to from-chat?]]]
[toolbar/toolbar
{:center
{:label :t/wallet-send
{:label (if (and (not to-norm) from-chat?) :t/wallet-send :t/next)
:accessibility-label :send-transaction-bottom-sheet
:disabled? (not sign-enabled?)
:on-press #(re-frame/dispatch
Expand Down

0 comments on commit 285ad24

Please sign in to comment.