From 49ae5cbbc71ce15115ed12dda2db4bd028c9e127 Mon Sep 17 00:00:00 2001 From: Vadym Struts Date: Wed, 8 May 2024 19:15:16 +0200 Subject: [PATCH] removed ipfs pin and autopin for NFT #1 Signed-off-by: Vadym Struts --- app/brave_settings_strings.grdp | 3 --- browser/about_flags.cc | 8 -------- .../extensions/api/settings_private/brave_prefs_util.cc | 3 --- .../settings/brave_wallet_page/brave_wallet_page.ts | 6 ------ .../brave_settings_localized_strings_provider.cc | 4 ---- components/brave_wallet/browser/brave_wallet_prefs.cc | 2 -- components/brave_wallet/browser/pref_names.h | 2 -- components/brave_wallet/common/features.cc | 9 --------- components/brave_wallet/common/features.h | 1 - ios/browser/api/features/features.h | 1 - ios/browser/api/features/features.mm | 5 ----- ios/browser/flags/about_flags.mm | 8 -------- 12 files changed, 52 deletions(-) diff --git a/app/brave_settings_strings.grdp b/app/brave_settings_strings.grdp index 7aa7f834b8d8..f4098b18d860 100644 --- a/app/brave_settings_strings.grdp +++ b/app/brave_settings_strings.grdp @@ -1158,9 +1158,6 @@ Are you sure you want to reset your wallet? If your wallet is not backed up, resetting will cause you to lose all account data (including any associated funds). Type "$1Yes" to confirm. - - Are you sure you want to clear your pinned NFTs? Some of NFTs may be lost forever if there is no other hosters in the IPFS network. Type "$1Yes" to confirm. - Your wallet was reset. diff --git a/browser/about_flags.cc b/browser/about_flags.cc index 8e18910cfde4..052c8c6c29c7 100644 --- a/browser/about_flags.cc +++ b/browser/about_flags.cc @@ -208,14 +208,6 @@ #define BRAVE_NATIVE_WALLET_FEATURE_ENTRIES \ EXPAND_FEATURE_ENTRIES( \ - { \ - "enable-nft-pinning", \ - "Enable NFT pinning", \ - "Enable NFT pinning for Brave Wallet", \ - kOsDesktop, \ - FEATURE_VALUE_TYPE( \ - brave_wallet::features::kBraveWalletNftPinningFeature), \ - }, \ { \ "native-brave-wallet", \ "Enable Brave Wallet", \ diff --git a/browser/extensions/api/settings_private/brave_prefs_util.cc b/browser/extensions/api/settings_private/brave_prefs_util.cc index 3ee5cf1b773f..24863f8c6b49 100644 --- a/browser/extensions/api/settings_private/brave_prefs_util.cc +++ b/browser/extensions/api/settings_private/brave_prefs_util.cc @@ -323,9 +323,6 @@ const PrefsUtil::TypedPrefMap& BravePrefsUtil::GetAllowlistedKeys() { (*s_brave_allowlist)[kEnableMediaRouterOnRestart] = settings_api::PrefType::kBoolean; - // NFT pinning pref - (*s_brave_allowlist)[kAutoPinEnabled] = settings_api::PrefType::kBoolean; - #if defined(TOOLKIT_VIEWS) // Vertical tab strip prefs (*s_brave_allowlist)[brave_tabs::kVerticalTabsEnabled] = diff --git a/browser/resources/settings/brave_wallet_page/brave_wallet_page.ts b/browser/resources/settings/brave_wallet_page/brave_wallet_page.ts index 6c67d2046194..9851b2a91f77 100644 --- a/browser/resources/settings/brave_wallet_page/brave_wallet_page.ts +++ b/browser/resources/settings/brave_wallet_page/brave_wallet_page.ts @@ -66,12 +66,6 @@ class SettingsBraveWalletPage extends SettingsBraveWalletPageBase { } } - static get observers(){ - return [ - 'onShowOptionChanged_(prefs.brave.wallet.auto_pin_enabled.value)' - ] - } - browserProxy_ = BraveWalletBrowserProxyImpl.getInstance() ready() { diff --git a/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc b/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc index 02d5f90d200d..a117fdd3b3e3 100644 --- a/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc +++ b/browser/ui/webui/settings/brave_settings_localized_strings_provider.cc @@ -762,10 +762,6 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source, confirmation_phrase); html_source->AddString("walletResetTransactionInfoConfirmation", reset_tx_confirmation_text); - auto clear_pinned_nft_confirmation = l10n_util::GetStringFUTF16( - IDS_SETTINGS_WALLET_CLEAR_PINNED_NFT_CONFIRMATION, confirmation_phrase); - html_source->AddString("walletClearPinnedNftConfirmation", - clear_pinned_nft_confirmation); #if BUILDFLAG(ENABLE_EXTENSIONS) html_source->AddString("webDiscoveryLearnMoreURL", kWebDiscoveryLearnMoreUrl); #endif diff --git a/components/brave_wallet/browser/brave_wallet_prefs.cc b/components/brave_wallet/browser/brave_wallet_prefs.cc index e0785160261a..ba5e2a90e755 100644 --- a/components/brave_wallet/browser/brave_wallet_prefs.cc +++ b/components/brave_wallet/browser/brave_wallet_prefs.cc @@ -193,8 +193,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterDictionaryPref(kBraveWalletLastTransactionSentTimeDict); registry->RegisterTimePref(kBraveWalletLastDiscoveredAssetsAt, base::Time()); - registry->RegisterDictionaryPref(kPinnedNFTAssets); - registry->RegisterBooleanPref(kAutoPinEnabled, false); registry->RegisterBooleanPref(kShouldShowWalletSuggestionBadge, true); registry->RegisterBooleanPref(kBraveWalletNftDiscoveryEnabled, false); registry->RegisterBooleanPref(kBraveWalletPrivateWindowsEnabled, false); diff --git a/components/brave_wallet/browser/pref_names.h b/components/brave_wallet/browser/pref_names.h index 7c61b1556e1c..e5893fb8f7a2 100644 --- a/components/brave_wallet/browser/pref_names.h +++ b/components/brave_wallet/browser/pref_names.h @@ -76,8 +76,6 @@ inline constexpr char kBraveWalletNftDiscoveryEnabled[] = "brave.wallet.nft_discovery_enabled"; inline constexpr char kBraveWalletLastDiscoveredAssetsAt[] = "brave.wallet.last_discovered_assets_at"; -inline constexpr char kPinnedNFTAssets[] = "brave.wallet.user_pin_data"; -inline constexpr char kAutoPinEnabled[] = "brave.wallet.auto_pin_enabled"; inline constexpr char kBraveWalletPrivateWindowsEnabled[] = "brave.wallet.private_windows_enabled"; inline constexpr char kBraveWalletTransactionSimulationOptInStatus[] = diff --git a/components/brave_wallet/common/features.cc b/components/brave_wallet/common/features.cc index 8e11903ab097..9f03e14dc416 100644 --- a/components/brave_wallet/common/features.cc +++ b/components/brave_wallet/common/features.cc @@ -16,15 +16,6 @@ BASE_FEATURE(kNativeBraveWalletFeature, "NativeBraveWallet", base::FEATURE_ENABLED_BY_DEFAULT); -BASE_FEATURE(kBraveWalletNftPinningFeature, - "BraveWalletNftPinning", -#if BUILDFLAG(IS_ANDROID) - base::FEATURE_DISABLED_BY_DEFAULT -#else - base::FEATURE_ENABLED_BY_DEFAULT -#endif -); - BASE_FEATURE(kBraveWalletBitcoinFeature, "BraveWalletBitcoin", #if BUILDFLAG(ENABLE_BITCOIN_BY_DEFAULT) diff --git a/components/brave_wallet/common/features.h b/components/brave_wallet/common/features.h index 8f076cc404a1..82574a703e23 100644 --- a/components/brave_wallet/common/features.h +++ b/components/brave_wallet/common/features.h @@ -13,7 +13,6 @@ namespace brave_wallet { namespace features { BASE_DECLARE_FEATURE(kNativeBraveWalletFeature); -BASE_DECLARE_FEATURE(kBraveWalletNftPinningFeature); BASE_DECLARE_FEATURE(kBraveWalletBitcoinFeature); extern const base::FeatureParam kBitcoinRpcThrottle; extern const base::FeatureParam kBitcoinTestnetDiscovery; diff --git a/ios/browser/api/features/features.h b/ios/browser/api/features/features.h index e3d9481199d3..5e48d8f22744 100644 --- a/ios/browser/api/features/features.h +++ b/ios/browser/api/features/features.h @@ -55,7 +55,6 @@ OBJC_EXPORT @property(class, nonatomic, readonly) Feature* kBraveSync; @property(class, nonatomic, readonly) Feature* kBraveWalletAnkrBalancesFeature; @property(class, nonatomic, readonly) Feature* kBraveWalletBitcoinFeature; -@property(class, nonatomic, readonly) Feature* kBraveWalletNftPinningFeature; @property(class, nonatomic, readonly) Feature* kBraveWalletZCashFeature; @property(class, nonatomic, readonly) Feature* kConstellation; @property(class, nonatomic, readonly) Feature* kConstellationEnclaveAttestation; diff --git a/ios/browser/api/features/features.mm b/ios/browser/api/features/features.mm index af096b322470..a19e089b4e20 100644 --- a/ios/browser/api/features/features.mm +++ b/ios/browser/api/features/features.mm @@ -215,11 +215,6 @@ + (Feature*)kBraveWalletBitcoinFeature { initWithFeature:&brave_wallet::features::kBraveWalletBitcoinFeature]; } -+ (Feature*)kBraveWalletNftPinningFeature { - return [[Feature alloc] - initWithFeature:&brave_wallet::features::kBraveWalletNftPinningFeature]; -} - + (Feature*)kBraveWalletZCashFeature { return [[Feature alloc] initWithFeature:&brave_wallet::features::kBraveWalletZCashFeature]; diff --git a/ios/browser/flags/about_flags.mm b/ios/browser/flags/about_flags.mm index e97259915518..a99677551f04 100644 --- a/ios/browser/flags/about_flags.mm +++ b/ios/browser/flags/about_flags.mm @@ -52,14 +52,6 @@ #define BRAVE_NATIVE_WALLET_FEATURE_ENTRIES \ EXPAND_FEATURE_ENTRIES( \ - { \ - "enable-nft-pinning", \ - "Enable NFT pinning", \ - "Enable NFT pinning for Brave Wallet", \ - flags_ui::kOsIos, \ - FEATURE_VALUE_TYPE( \ - brave_wallet::features::kBraveWalletNftPinningFeature), \ - }, \ { \ "brave-wallet-zcash", \ "Enable BraveWallet ZCash support", \