fix: wallet send navigation flow (#20008)

fix: wallet send navigation flow (#20008)
This commit is contained in:
Omar Basem 2024-05-16 18:15:53 +04:00 committed by GitHub
parent 3e33ccb9ca
commit 219ae0ccbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View File

@ -19,9 +19,7 @@
{:screen-id :screen/wallet.select-asset {:screen-id :screen/wallet.select-asset
:skip-step? (fn [db] (or (token-selected? db) (collectible-selected? db)))} :skip-step? (fn [db] (or (token-selected? db) (collectible-selected? db)))}
{:screen-id :screen/wallet.send-input-amount {:screen-id :screen/wallet.send-input-amount
:skip-step? (fn [db] :skip-step? (fn [db] (= (get-in db [:wallet :ui :send :tx-type]) :collectible))}
(or (not (token-selected? db))
(some? (get-in db [:wallet :ui :send :amount]))))}
{:screen-id :screen/wallet.select-collectible-amount {:screen-id :screen/wallet.select-collectible-amount
:skip-step? (fn [db] :skip-step? (fn [db]
(or (not (collectible-selected? db)) (or (not (collectible-selected? db))

View File

@ -67,6 +67,9 @@
(rf/dispatch [:wallet/clean-selected-token]) (rf/dispatch [:wallet/clean-selected-token])
(rf/dispatch [:wallet/clean-selected-collectible]) (rf/dispatch [:wallet/clean-selected-collectible])
(rf/dispatch [:navigate-back]))] (rf/dispatch [:navigate-back]))]
(rn/use-unmount (fn []
(rf/dispatch [:wallet/clean-selected-token])
(rf/dispatch [:wallet/clean-selected-collectible])))
(fn [] (fn []
[rn/safe-area-view {:style style/container} [rn/safe-area-view {:style style/container}
[account-switcher/view [account-switcher/view

View File

@ -1,10 +1,10 @@
(ns status-im.contexts.wallet.wallet-connect.utils (ns status-im.contexts.wallet.wallet-connect.utils
;; NOTE: Not sorting namespaces since @walletconnect/react-native-compat should be the first ;; NOTE: Not sorting namespaces since @walletconnect/react-native-compat should be the first
#_{:clj-kondo/ignore [:unsorted-required-namespaces]} #_{:clj-kondo/ignore [:unsorted-required-namespaces]}
(:require ["@walletconnect/react-native-compat"] (:require ["@walletconnect/core" :refer [Core]]
["@walletconnect/core" :refer [Core]] ["@walletconnect/react-native-compat"]
["@walletconnect/web3wallet" :refer [Web3Wallet]]
["@walletconnect/utils" :refer [buildApprovedNamespaces]] ["@walletconnect/utils" :refer [buildApprovedNamespaces]]
["@walletconnect/web3wallet" :refer [Web3Wallet]]
[status-im.config :as config] [status-im.config :as config]
[utils.i18n :as i18n])) [utils.i18n :as i18n]))