Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet: send token from drawer #18429

Merged
merged 8 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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