fix_: include assets only related to selected network on edit asset drawer on send and bridge flows (#21869)

Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
Brian Sztamfater 2024-12-30 11:36:43 -03:00 committed by GitHub
parent 5007dc757f
commit c1b0f3ae98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,9 @@
(defn select-asset-bottom-sheet (defn select-asset-bottom-sheet
[clear-input!] [clear-input!]
(let [{preselected-token-symbol :symbol} (rf/sub [:wallet/wallet-send-token])] (let [{preselected-token-symbol :symbol} (rf/sub [:wallet/wallet-send-token])
network (rf/sub [:wallet/send-network])
chain-id (:chain-id network)]
[:<> ;; Need to be a `:<>` to keep `asset-list` scrollable. [:<> ;; Need to be a `:<>` to keep `asset-list` scrollable.
[quo/drawer-top [quo/drawer-top
{:title (i18n/label :t/select-token) {:title (i18n/label :t/select-token)
@ -31,6 +33,7 @@
{:content-container-style {:padding-horizontal 8 {:content-container-style {:padding-horizontal 8
:padding-bottom 8} :padding-bottom 8}
:preselected-token-symbol preselected-token-symbol :preselected-token-symbol preselected-token-symbol
:chain-ids [chain-id]
:on-token-press (fn [token] :on-token-press (fn [token]
(rf/dispatch [:wallet/edit-token-to-send token]) (rf/dispatch [:wallet/edit-token-to-send token])
(clear-input!))}]])) (clear-input!))}]]))