fix flows when starting from account page

This commit is contained in:
Brian Sztamfater 2024-11-24 21:26:09 -03:00
parent 87f32e8b6e
commit bc75a5a2bb
No known key found for this signature in database
GPG Key ID: 59EB921E0706B48F
2 changed files with 4 additions and 7 deletions

View File

@ -192,6 +192,8 @@
(when (and token-symbol unique-owner)
(some #(when (= (:symbol %) token-symbol) %)
unique-owner-tokens)))
view-id (:view-id db)
root-screen? (or (= view-id :wallet-stack) (nil? view-id))
multi-account-balance? (-> (utils/get-accounts-with-token-balance (:accounts wallet)
token)
(count)
@ -221,7 +223,7 @@
:token-symbol (:symbol token-data)))
unique-owner (assoc-in [:wallet :current-viewing-account-address] unique-owner)
entry-point (assoc-in [:wallet :ui :send :entry-point] entry-point))
:fx (if multi-account-balance?
:fx (if (and multi-account-balance? root-screen?)
[[:dispatch [:open-modal :screen/wallet.select-from]]]
(if (or (= next-screen :screen/wallet.select-from) (some? network))
[[:dispatch [:wallet/stop-and-clean-suggested-routes]]
@ -699,6 +701,7 @@
flow-id (if bridge-tx?
:wallet-bridge-flow
:wallet-send-flow)]
(println address "43423432423")
{:db (cond-> db
network (assoc-in [:wallet :ui :send :network] network)
token-symbol (assoc-in [:wallet :ui :send :token] token)

View File

@ -6,7 +6,6 @@
[status-im.common.floating-button-page.view :as floating-button-page]
[status-im.contexts.wallet.common.account-switcher.view :as account-switcher]
[status-im.contexts.wallet.send.from.style :as style]
[status-im.setup.hot-reload :as hot-reload]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
@ -18,10 +17,6 @@
:stack-id :screen/wallet.select-from
:start-flow? true}]))
(defn- on-close
[]
(rf/dispatch [:wallet/clean-current-viewing-account]))
(defn- render-fn
[item _ _ {:keys [network-details]}]
(let [transformed-address (rf/sub [:wallet/account-address (:address item)
@ -36,7 +31,6 @@
[]
(let [accounts (rf/sub [:wallet/accounts-with-current-asset])
network-details (rf/sub [:wallet/network-details])]
(hot-reload/use-safe-unmount on-close)
[floating-button-page/view
{:footer-container-padding 0
:header [account-switcher/view