Skip to content

Commit

Permalink
[#19765] feat: save an address by scanning it's QR code
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Jun 5, 2024
1 parent b4a0e74 commit 5caa45f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.common.not-implemented :as not-implemented]
[status-im.contexts.settings.wallet.saved-addresses.add-address-to-save.style :as style]
[status-im.contexts.wallet.common.validation :as validation]
[utils.i18n :as i18n]
Expand Down Expand Up @@ -35,7 +34,10 @@

(defn- address-input
[{:keys [input-value on-change-text paste-into-input clear-input]}]
(let [empty-input? (string/blank? input-value)]
(let [empty-input? (string/blank? input-value)
on-scan-result (rn/use-callback #(on-change-text %))
on-scan-address (rn/use-callback #(rf/dispatch [:open-modal :screen/wallet.scan-address
{:on-result on-scan-result}]))]
[rn/view {:style style/input-container}
[quo/input
{:accessibility-label :add-address-to-save
Expand All @@ -55,7 +57,7 @@
:value input-value}]
[quo/button
{:type :outline
:on-press not-implemented/alert
:on-press on-scan-address
:container-style style/scan-button
:background :blur
:size 40
Expand Down

0 comments on commit 5caa45f

Please sign in to comment.