Skip to content

Commit

Permalink
Wallet: send token from drawer (#18429)
Browse files Browse the repository at this point in the history
* feat: send token drawer
  • Loading branch information
OmarBasem authored Jan 15, 2024
1 parent fa9b6ed commit 8a16017
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/quo/components/list_items/token_network/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
(def info
{:flex-direction :row
:align-items :center
:width "60%"})
:width "70%"})

(def token-info
{:height 40
Expand All @@ -42,7 +42,7 @@

(def values-container
{:align-items :flex-end
:max-width "40%"})
:max-width "30%"})

(defn fiat-value
[theme]
Expand Down
1 change: 1 addition & 0 deletions src/status_im/contexts/wallet/common/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"<$0.01"
(prettify-balance currency-symbol fiat-value)))


(defn calculate-token-value
"This function returns token values in the props of token-value (quo) component"
[{:keys [token color currency currency-symbol]}]
Expand Down
1 change: 1 addition & 0 deletions src/status_im/contexts/wallet/send/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
(update-in [:wallet :ui :send] dissoc :route)
(update-in [:wallet :ui :send] dissoc :loading-suggested-routes?))}))


(rf/reg-event-fx :wallet/select-send-account-address
(fn [{:keys [db]} [{:keys [address stack-id]}]]
{:db (-> db
Expand Down
4 changes: 1 addition & 3 deletions src/status_im/contexts/wallet/send/input_amount/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@
:left-action :dot
:delete-key? true
:on-press handle-keyboard-press
:on-delete handle-delete}]
]
))))
:on-delete handle-delete}]]))))

(defn- view-internal
[props]
Expand Down
3 changes: 3 additions & 0 deletions src/status_im/contexts/wallet/send/select_address/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@
(rf/dispatch [:wallet/clean-scanned-address])
(rf/dispatch [:wallet/clean-local-suggestions])
(rf/dispatch [:wallet/clean-account-selection])
(rf/dispatch [:wallet/clean-selected-token])
(rf/dispatch [:wallet/select-address-tab nil])
(rf/dispatch [:navigate-back]))
on-change-tab #(rf/dispatch [:wallet/select-address-tab %])
input-value (reagent/atom "")
input-focused? (reagent/atom false)]
(fn []
(let [selected-tab (or (rf/sub [:wallet/send-tab]) (:id (first tabs-data)))
token (rf/sub [:wallet/wallet-send-token])
valid-ens-or-address? (boolean (rf/sub [:wallet/valid-ens-or-address?]))]
(rn/use-effect (fn []
(fn []
Expand All @@ -143,6 +145,7 @@
:disabled? (not valid-ens-or-address?)
:on-press #(rf/dispatch [:wallet/select-send-address
{:address @input-value
:token token
:stack-id :wallet-select-address}])}
(i18n/label :t/continue)])}
[quo/text-combinations
Expand Down

0 comments on commit 8a16017

Please sign in to comment.