diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index d8f15918a9c2..7c5f89eeeced 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -4653,15 +4653,6 @@ "message": "Kontaktieren Sie die Ersteller von $1 für weitere Unterstützung.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Bei Aktivierung dieser Funktion haben Sie die Möglichkeit, ein Solana-Konto zu Ihrer MetaMask-Erweiterung hinzuzufügen, das von Ihrer bestehenden geheimen Wiederherstellungsphrase abgeleitet ist. Hierbei handelt es sich um eine experimentelle Beta-Funktion, deren Nutzung also auf eigene Gefahr erfolgt." - }, - "solanaSupportToggleTitle": { - "message": "Aktivierung der Funktion „Ein neues Solana-Konto hinzufügen (Beta)“" - }, "somethingDoesntLookRight": { "message": "Scheint irgendetwas nicht in Ordnung zu sein? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 21ce8d173eaf..f9c0ff48b49e 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -4653,15 +4653,6 @@ "message": "Επικοινωνήστε με τους διαχειριστές του $1 για περαιτέρω υποστήριξη.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Η ενεργοποίηση αυτής της λειτουργίας θα σας δώσει τη δυνατότητα να προσθέσετε έναν λογαριασμό Solana στην επέκταση του MetaMask που προέρχεται από την υπάρχουσα Μυστική Φράση Ανάκτησης. Πρόκειται για μια πειραματική λειτουργία Beta, οπότε θα πρέπει να τη χρησιμοποιήσετε με δική σας ευθύνη." - }, - "solanaSupportToggleTitle": { - "message": "Ενεργοποίηση της λειτουργίας \"Προσθήκη νέου λογαριασμού Solana (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Κάτι δεν φαίνεται σωστό; $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 0eb802250fbb..d79c1d993bc4 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -4991,15 +4991,6 @@ "message": "Contact the creators of $1 for further support.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Turning on this feature will give you the option to add a Solana Account to your MetaMask Extension derived from your existing Secret Recovery Phrase. This is an experimental Beta feature, so you should use it at your own risk." - }, - "solanaSupportToggleTitle": { - "message": "Enable \"Add a new Solana account (Beta)\"" - }, "someNetworks": { "message": "$1 networks" }, diff --git a/app/_locales/en_GB/messages.json b/app/_locales/en_GB/messages.json index 0eb802250fbb..d79c1d993bc4 100644 --- a/app/_locales/en_GB/messages.json +++ b/app/_locales/en_GB/messages.json @@ -4991,15 +4991,6 @@ "message": "Contact the creators of $1 for further support.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Turning on this feature will give you the option to add a Solana Account to your MetaMask Extension derived from your existing Secret Recovery Phrase. This is an experimental Beta feature, so you should use it at your own risk." - }, - "solanaSupportToggleTitle": { - "message": "Enable \"Add a new Solana account (Beta)\"" - }, "someNetworks": { "message": "$1 networks" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 4ff395f5e8b3..56085f47c6c3 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -4653,15 +4653,6 @@ "message": "Póngase en contacto con los creadores de $1 para obtener más ayuda.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Activar esta función le dará la opción de añadir una cuenta de Solana a su extensión MetaMask derivada de su frase secreta de recuperación existente. Esta es una característica Beta experimental, por lo que debe utilizarla bajo su propio riesgo." - }, - "solanaSupportToggleTitle": { - "message": "Activar \"Añadir una nueva cuenta de Solana (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Algo no se ve bien, ¿cierto? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index c971c85b3c4d..d69e1a049346 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -4653,15 +4653,6 @@ "message": "L’interface utilisateur (IU) spécifiée par le snap n’est pas valide.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "En activant cette fonctionnalité, vous aurez la possibilité d’ajouter un compte Solana à votre extension MetaMask dérivée de votre phrase secrète de récupération existante. Toute utilisation de cette fonctionnalité bêta expérimentale se fait à vos risques et périls." - }, - "solanaSupportToggleTitle": { - "message": "Activer « Ajouter un nouveau compte Solana (Bêta) »" - }, "somethingDoesntLookRight": { "message": "On dirait que quelque chose ne va pas ? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 7c3e4ca5d331..df3b01792817 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -4653,15 +4653,6 @@ "message": "अधिक सहायता के लिए $1 के निर्माताओं से कॉन्टेक्ट करें।", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "सोलाना" - }, - "solanaSupportToggleDescription": { - "message": "इस फीचर को चालू करने से आपको अपने मौजूदा सीक्रेट रिकवरी फ्रेज़ से प्राप्त MetaMask एक्सटेंशन में एक सोलाना अकाउंट जोड़ने का विकल्प मिलेगा। यह एक प्रायोगिक बीटा फीचर है, इसलिए आपको इसका उपयोग अपने जोखिम पर करना होगा।" - }, - "solanaSupportToggleTitle": { - "message": "\"एक नया सोलाना अकाउंट जोड़ें (बीटा)\" को चालू करें" - }, "somethingDoesntLookRight": { "message": "कुछ तो गड़बड़ है? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 4c150fe5dca4..1b25e03c859b 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -4653,15 +4653,6 @@ "message": "Hubungi pembuat $1 untuk dukungan lebih lanjut.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Mengaktifkan fitur ini akan memberi Anda opsi untuk menambahkan Akun Solana ke Ekstensi MetaMask yang berasal dari Frasa Pemulihan Rahasia yang sudah ada. Ini merupakan fitur Beta eksperimental, jadi Anda harus menggunakannya dengan risiko yang ditanggung sendiri." - }, - "solanaSupportToggleTitle": { - "message": "Aktifkan \"Tambahkan akun Solana baru (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Ada yang tidak beres? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index afad5e264d27..664b61342d65 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -4653,15 +4653,6 @@ "message": "今後のサポートは、$1の作成者にお問い合わせください。", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "この機能をオンにすると、既存のシークレットリカバリーフレーズで導出したSolanaアカウントをMetaMask Extensionに追加できるようになります。これは試験運用中のベータ機能であるため、自己責任でご使用ください。" - }, - "solanaSupportToggleTitle": { - "message": "「新規Solanaアカウントの追加 (ベータ)」を有効にする" - }, "somethingDoesntLookRight": { "message": "何か不審な点があれば、$1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index ce513201b803..b48b9655dad0 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -4653,15 +4653,6 @@ "message": "$1 작성자에게 연락하여 향후 지원을 요청하세요.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "솔라나" - }, - "solanaSupportToggleDescription": { - "message": "이 기능을 켜면 기존 비밀복구구문에서 파생된 솔라나 계정을 MetaMask 확장 프로그램에 추가하는 옵션이 제공됩니다. 이는 실험적 베타 기능이므로 사용자의 책임하에 사용해야 합니다." - }, - "solanaSupportToggleTitle": { - "message": "'새 솔라나 계정 추가(베타)' 활성화" - }, "somethingDoesntLookRight": { "message": "무언가 잘못되었나요? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 6b88ee8d4eeb..16c868f2a3d0 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -4656,15 +4656,6 @@ "message": "Contate os criadores de $1 para receber mais suporte.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Ativar este recurso lhe dará a opção de adicionar uma conta Solana à sua extensão da MetaMask derivada de sua Frase de Recuperação Secreta existente. Este é um recurso beta experimental, portanto seu uso será por sua conta e risco." - }, - "solanaSupportToggleTitle": { - "message": "Ative \"Adicionar uma nova conta Solana (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Alguma coisa não parece certa? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 70e439f6ceab..db1f8ac5e683 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -4653,15 +4653,6 @@ "message": "Свяжитесь с авторами $1 для получения дополнительной поддержки.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Включение этой функции даст вам возможность добавить в ваше расширение MetaMask счет Solana, созданный на основе вашей существующей секретной фразы для восстановления. Это экспериментальная бета-функция, которая используется вами на ваш страх и риск." - }, - "solanaSupportToggleTitle": { - "message": "Включить «Добавить новый счет Solana (бета-версия)»" - }, "somethingDoesntLookRight": { "message": "Что-то не так? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index ad6348143a82..6f859d53b154 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -4653,15 +4653,6 @@ "message": "Makipag-ugnayan sa mga tagalikha ng $1 para sa karagdagang suporta.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Kapag in-on ang feature na ito, magkakaroon ka ng opsyon na magdagdag ng Solana Account sa MetaMask extension mo mula sa dati mo nang Lihim na Parirala sa Pagbawi. Isa itong eksperimental na Beta feature kaya gamitin ito nang may pag-iingat." - }, - "solanaSupportToggleTitle": { - "message": "Paganahin ang \"Magdagdag ng bagong Solana account (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Mayroon bang hindi tama? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 15d2e042f8a2..129b9632c1ef 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -4653,15 +4653,6 @@ "message": "Daha fazla destek için $1 oluşturucuları ile iletişime geçin.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Bu özelliği açtığınızda mevcut Gizli Kurtarma İfadenizden türetilen MetaMask Uzantınıza bir Solana Hesabı ekleme seçeneğiniz olacaktır. Bu, deneysel bir Beta özelliğidir, bu yüzden riski kendinize ait olarak kullanmalısınız." - }, - "solanaSupportToggleTitle": { - "message": "\"Yeni bir Solana hesabı ekle (Beta)\" seçeneğini etkinleştir" - }, "somethingDoesntLookRight": { "message": "Doğru görünmeyen bir şeyler mi var? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 5db87583d8eb..e3f1ae9fd72b 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -4653,15 +4653,6 @@ "message": "Liên hệ với những người tạo ra $1 để được hỗ trợ thêm.", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "Bật tính năng này sẽ cung cấp cho bạn tùy chọn thêm Tài khoản Solana vào Tiện ích mở rộng MetaMask bắt nguồn từ Cụm từ khôi phục bí mật hiện có của bạn. Đây là một tính năng Beta thử nghiệm, nên bạn phải tự chịu rủi ro khi sử dụng nó." - }, - "solanaSupportToggleTitle": { - "message": "Bật \"Thêm tài khoản Solana mới (Beta)\"" - }, "somethingDoesntLookRight": { "message": "Có gì đó không ổn? $1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 2a66fcd269d5..8e1e936963cc 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -4653,15 +4653,6 @@ "message": "联系 $1 的创建者以获得进一步支持。", "description": "This is shown when the insight snap throws an error. $1 is the snap name" }, - "solanaSupportSectionTitle": { - "message": "Solana" - }, - "solanaSupportToggleDescription": { - "message": "启用此功能后,您可以选择将 Solana 账户添加到衍生自现有私钥助记词的 MetaMask Extension 中。这是一个实验性的测试版功能,因此您应自行承担使用风险。" - }, - "solanaSupportToggleTitle": { - "message": "启用“添加新的 Solana 账户(测试版)”" - }, "somethingDoesntLookRight": { "message": "有什么不对劲吗?$1", "description": "A false positive message for users to contact support. $1 is a link to the support page." diff --git a/app/scripts/controllers/preferences-controller.test.ts b/app/scripts/controllers/preferences-controller.test.ts index f3703f3c94e7..91fdf1d5a72c 100644 --- a/app/scripts/controllers/preferences-controller.test.ts +++ b/app/scripts/controllers/preferences-controller.test.ts @@ -845,19 +845,4 @@ describe('preferences controller', () => { ); }); }); - - describe('setSolanaSupportEnabled', () => { - const { controller } = setupController({}); - it('has the default value as false', () => { - expect(controller.state.solanaSupportEnabled).toStrictEqual(false); - }); - - it('sets the solanaSupportEnabled property in state to true and then false', () => { - controller.setSolanaSupportEnabled(true); - expect(controller.state.solanaSupportEnabled).toStrictEqual(true); - - controller.setSolanaSupportEnabled(false); - expect(controller.state.solanaSupportEnabled).toStrictEqual(false); - }); - }); }); diff --git a/app/scripts/controllers/preferences-controller.ts b/app/scripts/controllers/preferences-controller.ts index f05358d7310e..8dea21347c94 100644 --- a/app/scripts/controllers/preferences-controller.ts +++ b/app/scripts/controllers/preferences-controller.ts @@ -142,9 +142,6 @@ export type PreferencesControllerState = Omit< ///: BEGIN:ONLY_INCLUDE_IF(build-flask) watchEthereumAccountEnabled: boolean; ///: END:ONLY_INCLUDE_IF - ///: BEGIN:ONLY_INCLUDE_IF(solana) - solanaSupportEnabled: boolean; - ///: END:ONLY_INCLUDE_IF bitcoinSupportEnabled: boolean; bitcoinTestnetSupportEnabled: boolean; addSnapAccountEnabled?: boolean; @@ -187,9 +184,6 @@ export const getDefaultPreferencesControllerState = openSeaEnabled: true, securityAlertsEnabled: true, watchEthereumAccountEnabled: false, - ///: BEGIN:ONLY_INCLUDE_IF(solana) - solanaSupportEnabled: false, - ///: END:ONLY_INCLUDE_IF bitcoinSupportEnabled: false, bitcoinTestnetSupportEnabled: false, ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) @@ -340,10 +334,6 @@ const controllerMetadata = { persist: true, anonymous: false, }, - solanaSupportEnabled: { - persist: true, - anonymous: false, - }, bitcoinSupportEnabled: { persist: true, anonymous: false, @@ -663,20 +653,6 @@ export class PreferencesController extends BaseController< } ///: END:ONLY_INCLUDE_IF - ///: BEGIN:ONLY_INCLUDE_IF(solana) - /** - * Setter for the `solanaSupportEnabled` property. - * - * @param solanaSupportEnabled - Whether or not the user wants to - * enable the "Add a new Solana account" button. - */ - setSolanaSupportEnabled(solanaSupportEnabled: boolean): void { - this.update((state) => { - state.solanaSupportEnabled = solanaSupportEnabled; - }); - } - ///: END:ONLY_INCLUDE_IF - /** * Setter for the `bitcoinSupportEnabled` property. * diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 8719c1dd43d9..fd49bf2efaf4 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -3224,12 +3224,6 @@ export default class MetamaskController extends EventEmitter { preferencesController, ), ///: END:ONLY_INCLUDE_IF - ///: BEGIN:ONLY_INCLUDE_IF(solana) - setSolanaSupportEnabled: - preferencesController.setSolanaSupportEnabled.bind( - preferencesController, - ), - ///: END:ONLY_INCLUDE_IF setBitcoinSupportEnabled: preferencesController.setBitcoinSupportEnabled.bind( preferencesController, diff --git a/shared/constants/metametrics.ts b/shared/constants/metametrics.ts index f247f507285d..d9e3ab05a95a 100644 --- a/shared/constants/metametrics.ts +++ b/shared/constants/metametrics.ts @@ -651,7 +651,6 @@ export enum MetaMetricsEventName { BridgeLinkClicked = 'Bridge Link Clicked', BitcoinSupportToggled = 'Bitcoin Support Toggled', BitcoinTestnetSupportToggled = 'Bitcoin Testnet Support Toggled', - SolanaSupportToggled = 'Solana Support Toggled', CurrentCurrency = 'Current Currency', DappViewed = 'Dapp Viewed', DecryptionApproved = 'Decryption Approved', diff --git a/test/e2e/flask/solana/common-solana.ts b/test/e2e/flask/solana/common-solana.ts index bd67296334f2..5d29a7bc18fb 100644 --- a/test/e2e/flask/solana/common-solana.ts +++ b/test/e2e/flask/solana/common-solana.ts @@ -439,14 +439,12 @@ export async function mockGetFeeForMessage(mockServer: Mockttp) { export async function withSolanaAccountSnap( { title, - solanaSupportEnabled, showNativeTokenAsMainBalance, mockCalls, mockSendTransaction, importAccount, }: { title?: string; - solanaSupportEnabled?: boolean; showNativeTokenAsMainBalance?: boolean; mockCalls?: boolean; mockSendTransaction?: boolean; @@ -455,9 +453,7 @@ export async function withSolanaAccountSnap( test: (driver: Driver, mockServer: Mockttp) => Promise, ) { console.log('Starting withSolanaAccountSnap'); - let fixtures = new FixtureBuilder().withPreferencesController({ - solanaSupportEnabled: solanaSupportEnabled ?? true, - }); + let fixtures = new FixtureBuilder(); if (!showNativeTokenAsMainBalance) { fixtures = fixtures.withPreferencesControllerShowNativeTokenAsMainBalanceDisabled(); diff --git a/ui/components/multichain/account-list-menu/account-list-menu.tsx b/ui/components/multichain/account-list-menu/account-list-menu.tsx index e34e10266c5b..9d6ebf60ff02 100644 --- a/ui/components/multichain/account-list-menu/account-list-menu.tsx +++ b/ui/components/multichain/account-list-menu/account-list-menu.tsx @@ -72,7 +72,7 @@ import { getUpdatedAndSortedAccounts, getDefaultHomeActiveTabName, ///: BEGIN:ONLY_INCLUDE_IF(solana) - getIsSolanaSupportEnabled, + getRemoteFeatureFlags, ///: END:ONLY_INCLUDE_IF } from '../../../selectors'; import { setSelectedAccount } from '../../../store/actions'; @@ -287,7 +287,7 @@ export const AccountListMenu = ({ ///: END:ONLY_INCLUDE_IF ///: BEGIN:ONLY_INCLUDE_IF(solana) - const solanaSupportEnabled = useSelector(getIsSolanaSupportEnabled); + const { addSolanaAccount } = useSelector(getRemoteFeatureFlags); const solanaWalletSnapClient = useMultichainWalletSnapClient( WalletClientType.Solana, ); @@ -475,7 +475,7 @@ export const AccountListMenu = ({ } { ///: BEGIN:ONLY_INCLUDE_IF(solana) - solanaSupportEnabled && ( + addSolanaAccount && ( void; - ///: BEGIN:ONLY_INCLUDE_IF(solana) - solanaSupportEnabled: boolean; - setSolanaSupportEnabled: (value: boolean) => void; - ///: END:ONLY_INCLUDE_IF bitcoinSupportEnabled: boolean; setBitcoinSupportEnabled: (value: boolean) => void; bitcoinTestnetSupportEnabled: boolean; @@ -319,46 +315,6 @@ export default class ExperimentalTab extends PureComponent } ///: END:ONLY_INCLUDE_IF - ///: BEGIN:ONLY_INCLUDE_IF(solana) - renderSolanaSupport() { - const { t, trackEvent } = this.context; - const { solanaSupportEnabled, setSolanaSupportEnabled } = this.props; - - return ( - <> - - {t('solanaSupportSectionTitle')} - - {this.renderToggleSection({ - title: t('solanaSupportToggleTitle'), - description: t('solanaSupportToggleDescription'), - toggleValue: solanaSupportEnabled, - toggleCallback: (value) => { - trackEvent({ - event: MetaMetricsEventName.SolanaSupportToggled, - category: MetaMetricsEventCategory.Settings, - properties: { - enabled: !value, - }, - }); - setSolanaSupportEnabled(!value); - }, - toggleContainerDataTestId: 'solana-support-toggle-div', - toggleDataTestId: 'solana-support-toggle', - toggleOffLabel: t('off'), - toggleOnLabel: t('on'), - })} - - ); - } - ///: END:ONLY_INCLUDE_IF - render() { return (
@@ -383,11 +339,6 @@ export default class ExperimentalTab extends PureComponent this.renderBitcoinSupport() ///: END:ONLY_INCLUDE_IF } - { - ///: BEGIN:ONLY_INCLUDE_IF(solana) - this.renderSolanaSupport() - ///: END:ONLY_INCLUDE_IF - }
); } diff --git a/ui/pages/settings/experimental-tab/experimental-tab.container.ts b/ui/pages/settings/experimental-tab/experimental-tab.container.ts index ae1ea45f2de1..9f718b5f92c4 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.container.ts +++ b/ui/pages/settings/experimental-tab/experimental-tab.container.ts @@ -10,14 +10,8 @@ import { setPetnamesEnabled, setFeatureNotificationsEnabled, setWatchEthereumAccountEnabled, - ///: BEGIN:ONLY_INCLUDE_IF(solana) - setSolanaSupportEnabled, - ///: END:ONLY_INCLUDE_IF } from '../../../store/actions'; import { - ///: BEGIN:ONLY_INCLUDE_IF(solana) - getIsSolanaSupportEnabled, - ///: END:ONLY_INCLUDE_IF getIsBitcoinSupportEnabled, getIsBitcoinTestnetSupportEnabled, ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) @@ -37,9 +31,6 @@ const mapStateToProps = (state: MetaMaskReduxState) => { const petnamesEnabled = getPetnamesEnabled(state); const featureNotificationsEnabled = getFeatureNotificationsEnabled(state); return { - ///: BEGIN:ONLY_INCLUDE_IF(solana) - solanaSupportEnabled: getIsSolanaSupportEnabled(state), - ///: END:ONLY_INCLUDE_IF watchAccountEnabled: getIsWatchEthereumAccountEnabled(state), bitcoinSupportEnabled: getIsBitcoinSupportEnabled(state), bitcoinTestnetSupportEnabled: getIsBitcoinTestnetSupportEnabled(state), @@ -55,9 +46,6 @@ const mapDispatchToProps = (dispatch: MetaMaskReduxDispatch) => { return { setWatchAccountEnabled: (value: boolean) => setWatchEthereumAccountEnabled(value), - ///: BEGIN:ONLY_INCLUDE_IF(solana) - setSolanaSupportEnabled: (value: boolean) => setSolanaSupportEnabled(value), - ///: END:ONLY_INCLUDE_IF setBitcoinSupportEnabled: (value: boolean) => setBitcoinSupportEnabled(value), setBitcoinTestnetSupportEnabled: (value: boolean) => diff --git a/ui/pages/settings/experimental-tab/experimental-tab.test.js b/ui/pages/settings/experimental-tab/experimental-tab.test.js index 7bf4b38644e8..9df1678ccb06 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.test.js +++ b/ui/pages/settings/experimental-tab/experimental-tab.test.js @@ -30,7 +30,7 @@ describe('ExperimentalTab', () => { const { getAllByRole } = render(); const toggle = getAllByRole('checkbox'); - expect(toggle).toHaveLength(6); + expect(toggle).toHaveLength(5); }); it('enables add account snap', async () => { @@ -90,21 +90,4 @@ describe('ExperimentalTab', () => { expect(setBitcoinSupportEnabled).toHaveBeenNthCalledWith(1, true); }); }); - - it('enables the experimental solana account feature', async () => { - const setSolanaSupportEnabled = jest.fn(); - const { getByTestId } = render( - {}, - { - setSolanaSupportEnabled, - solanaSupportEnabled: false, - }, - ); - const toggle = getByTestId('solana-support-toggle'); - - fireEvent.click(toggle); - await waitFor(() => { - expect(setSolanaSupportEnabled).toHaveBeenNthCalledWith(1, true); - }); - }); }); diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index d4992aeb67df..b100af3c2fed 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -2684,18 +2684,6 @@ export function getIsBitcoinSupportEnabled(state) { return state.metamask.bitcoinSupportEnabled; } -///: BEGIN:ONLY_INCLUDE_IF(solana) -/** - * Get the state of the `solanaSupportEnabled` flag. - * - * @param {*} state - * @returns The state of the `solanaSupportEnabled` flag. - */ -export function getIsSolanaSupportEnabled(state) { - return state.metamask.solanaSupportEnabled; -} -///: END:ONLY_INCLUDE_IF - /** * Get the state of the `bitcoinTestnetSupportEnabled` flag. * diff --git a/ui/store/actions.ts b/ui/store/actions.ts index 033cf0185161..9a2c2671c69e 100644 --- a/ui/store/actions.ts +++ b/ui/store/actions.ts @@ -5128,16 +5128,6 @@ export async function setBitcoinTestnetSupportEnabled(value: boolean) { } } -///: BEGIN:ONLY_INCLUDE_IF(solana) -export async function setSolanaSupportEnabled(value: boolean) { - try { - await submitRequestToBackground('setSolanaSupportEnabled', [value]); - } catch (error) { - logErrorWithMessage(error); - } -} -///: END:ONLY_INCLUDE_IF - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) export async function setAddSnapAccountEnabled(value: boolean): Promise { try {