From 8133c4c5f0266a949cc1704c13f107a03f21a30b Mon Sep 17 00:00:00 2001 From: Jamie Caprani Date: Mon, 5 Aug 2024 18:08:05 +0100 Subject: [PATCH] chore(wallet): feature flag adding watch only accounts (#20955) * chore(wallet): feature flag adding watch only accounts * e2e: disabled test for watch-only accounts --------- Co-authored-by: Yevheniia Berdnyk --- src/status_im/contexts/wallet/home/view.cljs | 13 +++++++------ src/status_im/feature_flags.cljs | 1 + test/appium/tests/critical/test_wallet.py | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/status_im/contexts/wallet/home/view.cljs b/src/status_im/contexts/wallet/home/view.cljs index b28cd19653..4fdb0b0794 100644 --- a/src/status_im/contexts/wallet/home/view.cljs +++ b/src/status_im/contexts/wallet/home/view.cljs @@ -21,12 +21,13 @@ :label (i18n/label :t/add-account) :sub-label (i18n/label :t/add-account-description) :on-press #(rf/dispatch [:navigate-to :screen/wallet.create-account])} - {:icon :i/reveal - :accessibility-label :add-a-contact - :label (i18n/label :t/add-address-to-watch) - :sub-label (i18n/label :t/add-address-to-watch-description) - :on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch]) - :add-divider? true}]]]) + (when (ff/enabled? ::ff/wallet.add-watched-address) + {:icon :i/reveal + :accessibility-label :add-a-contact + :label (i18n/label :t/add-address-to-watch) + :sub-label (i18n/label :t/add-address-to-watch-description) + :on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch]) + :add-divider? true})]]]) (defn- new-account-card-data [] diff --git a/src/status_im/feature_flags.cljs b/src/status_im/feature_flags.cljs index 821c935675..d7e72d1cf0 100644 --- a/src/status_im/feature_flags.cljs +++ b/src/status_im/feature_flags.cljs @@ -22,6 +22,7 @@ :FLAG_WALLET_SETTINGS_IMPORT_ALL_KEYPAIRS) ::shell.jump-to (enabled-in-env? :ENABLE_JUMP_TO) + ::wallet.add-watched-address (enabled-in-env? :FLAG_ADD_WATCHED_ADDRESS) ::wallet.advanced-sending (enabled-in-env? :FLAG_ADVANCED_SENDING) ::wallet.assets-modal-hide (enabled-in-env? :FLAG_ASSETS_MODAL_HIDE) ::wallet.assets-modal-manage-tokens (enabled-in-env? :FLAG_ASSETS_MODAL_MANAGE_TOKENS) diff --git a/test/appium/tests/critical/test_wallet.py b/test/appium/tests/critical/test_wallet.py index 41bd850627..ecac564072 100644 --- a/test/appium/tests/critical/test_wallet.py +++ b/test/appium/tests/critical/test_wallet.py @@ -246,6 +246,7 @@ class TestWalletOneDevice(MultipleSharedDeviceTestCase): self.errors.verify_no_errors() @marks.testrail_id(727232) + @marks.skip("The feature is disabled in https://github.com/status-im/status-mobile/pull/20955") @marks.xfail(reason="Missing networks in account address, https://github.com/status-im/status-mobile/issues/20166") def test_wallet_add_remove_watch_only_account(self): self.wallet_view.just_fyi("Adding new watch only account")