From 7767cde3f9300f26d0cfa1cb387cfaa7985181c9 Mon Sep 17 00:00:00 2001 From: dan437 <80175477+dan437@users.noreply.github.com> Date: Tue, 24 Jan 2023 15:25:40 +0100 Subject: [PATCH] Remove a notification for falling back from STX to regular swaps --- app/_locales/de/messages.json | 16 ------- app/_locales/el/messages.json | 16 ------- app/_locales/en/messages.json | 16 ------- app/_locales/es/messages.json | 16 ------- app/_locales/fr/messages.json | 16 ------- app/_locales/hi/messages.json | 16 ------- app/_locales/id/messages.json | 16 ------- app/_locales/ja/messages.json | 16 ------- app/_locales/ko/messages.json | 16 ------- app/_locales/pt/messages.json | 16 ------- app/_locales/ru/messages.json | 16 ------- app/_locales/tl/messages.json | 16 ------- app/_locales/tr/messages.json | 16 ------- app/_locales/vi/messages.json | 16 ------- app/_locales/zh_CN/messages.json | 16 ------- test/jest/mock-store.js | 1 - ui/ducks/swaps/swaps.js | 9 ---- ui/ducks/swaps/swaps.test.js | 24 ---------- ui/pages/swaps/index.js | 63 ------------------------- ui/pages/swaps/view-quote/view-quote.js | 15 ++---- 20 files changed, 4 insertions(+), 348 deletions(-) diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index a9e0f83f5eb5..d13683f80070 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -3596,12 +3596,6 @@ "message": "Plötzliche Marktveränderungen können zu Ausfällen führen. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Intelligente Transaktionen sind vorübergehend nicht verfügbar, weil Sie eine ausstehende Transaktion haben." - }, - "stxFallbackUnavailable": { - "message": "Sie können Ihre Token immer noch tauschen, selbst während intelligente Transaktionen nicht verfügbar sind." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Ihr Swap wird privat eingereicht ..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Simulieren Sie Transaktionen vor der Übermittlung, um die Transaktionskosten zu senken und Ausfälle zu vermeiden." }, - "stxTryRegular": { - "message": "Versuchen Sie einen normalen Swap." - }, "stxTryingToCancel": { "message": "Es wird versucht, Ihre Transaktion abzubrechen ..." }, - "stxUnavailable": { - "message": "Intelligente Transaktionen sind deaktiviert" - }, "stxUnknown": { "message": "Status unbekannt" }, @@ -3685,10 +3673,6 @@ "message": "Sie benötigen $1 mehr $2, um diesen Swap abzuschließen", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Sie benötigen mehr als $1, um diesen Swap mit Hilfe intelligenter Transaktionen durchzuführen.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Die besten $1 Kurse.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 3f197f16800c..0284cd3d9f72 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -3596,12 +3596,6 @@ "message": "Οι ξαφνικές μεταβολές της αγοράς ενδέχεται να προκαλέσουν αποτυχίες. Εάν το πρόβλημα επιμένει, παρακαλούμε επικοινωνήστε με το $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Οι Έξυπνες Συναλλαγές είναι προσωρινά μη διαθέσιμες, επειδή έχετε μια συναλλαγή που εκκρεμεί." - }, - "stxFallbackUnavailable": { - "message": "Μπορείτε να ανταλλάξετε ακόμα τα token σας, ακόμα και αν οι Έξυπνες Συναλλαγές δεν είναι διαθέσιμες." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Ιδιωτική υποβολή της Ανταλλαγής σας..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Προσομοίωση συναλλαγών πριν από την υποβολή για μείωση του κόστους συναλλαγής και των αποτυχιών." }, - "stxTryRegular": { - "message": "Δοκιμάστε μια κανονική ανταλλαγή." - }, "stxTryingToCancel": { "message": "Γίνεται προσπάθεια ακύρωσης της συναλλαγής σας..." }, - "stxUnavailable": { - "message": "Οι Έξυπνες Συναλλαγές είναι απενεργοποιημένες" - }, "stxUnknown": { "message": "Άγνωστη κατάσταση" }, @@ -3685,10 +3673,6 @@ "message": "Χρειάζεστε $1 περισσότερα $2 για να ολοκληρώσετε αυτήν την ανταλλαγή", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Χρειάζεστε περισσότερα $1 για να ολοκληρώσετε αυτήν την ανταλλαγή χρησιμοποιώντας τη λειτουργία των έξυπνων συναλλαγών.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Το καλύτερο από $1 προσφορές.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index db771ad38aaf..a609e7bed937 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -3627,12 +3627,6 @@ "message": "Sudden market changes can cause failures. If the problem persists, please reach out to $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Smart Transactions are temporarily unavailable because you have a pending transaction." - }, - "stxFallbackUnavailable": { - "message": "You can still swap your tokens even while Smart Transactions are unavailable." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Privately submitting your Swap..." }, @@ -3656,15 +3650,9 @@ "stxTooltip": { "message": "Simulate transactions before submitting to decrease transaction costs and reduce failures." }, - "stxTryRegular": { - "message": "Try a regular swap." - }, "stxTryingToCancel": { "message": "Trying to cancel your transaction..." }, - "stxUnavailable": { - "message": "Smart Transactions are disabled" - }, "stxUnknown": { "message": "Status unknown" }, @@ -3716,10 +3704,6 @@ "message": "You need $1 more $2 to complete this swap", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "You need more $1 to complete this swap using smart transactions.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Best of $1 quotes.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 981790fb6492..e5e22602d2b1 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -3596,12 +3596,6 @@ "message": "Los cambios repentinos del mercado pueden causar fallas. Si el problema persiste, comuníquese con $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Las transacciones inteligentes no están disponibles temporalmente porque tiene una transacción pendiente." - }, - "stxFallbackUnavailable": { - "message": "Todavía puede intercambiar sus tokens incluso cuando las transacciones inteligentes no están disponibles." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Enviando su swap de forma privada..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Simule transacciones antes de enviarlas para disminuir los costos de transacción y reducir las fallas." }, - "stxTryRegular": { - "message": "Pruebe con un swap regular." - }, "stxTryingToCancel": { "message": "Intentando cancelar su transacción..." }, - "stxUnavailable": { - "message": "Las transacciones inteligentes están deshabilitadas" - }, "stxUnknown": { "message": "Estado desconocido" }, @@ -3685,10 +3673,6 @@ "message": "Necesita $1 más $2 para completar este canje", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Necesita más $1 para finalizar este swap mediante transacciones inteligentes.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Mejor cotización de $1.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 8bf8d486acb7..f63e3b7b089b 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -3596,12 +3596,6 @@ "message": "Les fluctuations soudaines du marché peuvent provoquer des échecs. Si le problème persiste, veuillez contacter $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Les transactions intelligentes sont temporairement indisponibles parce que vous avez une transaction en attente." - }, - "stxFallbackUnavailable": { - "message": "Vous pouvez toujours faire un swap de tokens, même si les transactions intelligentes ne sont pas disponibles." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Soumission privée de votre Swap..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Simulez les transactions avant de les soumettre pour réduire les coûts et les échecs de transaction." }, - "stxTryRegular": { - "message": "Essayez un swap normal." - }, "stxTryingToCancel": { "message": "Tentative d’annulation de votre transaction..." }, - "stxUnavailable": { - "message": "Transactions intelligentes désactivées" - }, "stxUnknown": { "message": "État inconnu" }, @@ -3685,10 +3673,6 @@ "message": "Vous avez besoin de $1 $2 de plus pour effectuer ce swap", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Vous avez besoin de plus de $1 pour effectuer cet échange en utilisant des transactions intelligentes.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Meilleures cotations de $1.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index b2d154dd10e1..737429c96bf6 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -3596,12 +3596,6 @@ "message": "मार्केट के आकस्मिक बदलावों के कारण विफलताएं हो सकती हैं। अगर समस्या जारी रहती है, तो कृपया $1 से संपर्क करें।", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "स्मार्ट लेनदेन अस्थायी रूप से अनुपलब्ध हैं क्योंकि आपके पास एक लंबित लेनदेन है।" - }, - "stxFallbackUnavailable": { - "message": "स्मार्ट लेनदेन अनुपलब्ध होने पर भी आप अपने टोकनों को स्वैप कर सकते हैं।" - }, "stxPendingPrivatelySubmittingSwap": { "message": "आपका स्वैप निजी रूप से सबमिट किया जा रहा है..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "लेनदेन की लागतें घटाने और विफलताओं को कम करने के लिए सबमिट करने से पहले लेनदेन को सिम्युलेट करें।" }, - "stxTryRegular": { - "message": "नियमित स्वैप का प्रयास करें।" - }, "stxTryingToCancel": { "message": "अपके लेनदेन को रद्द करने का प्रयास कर रहा है..." }, - "stxUnavailable": { - "message": "स्मार्ट लेनदेन अक्षम किए गए हैं" - }, "stxUnknown": { "message": "स्टेटस अज्ञात" }, @@ -3685,10 +3673,6 @@ "message": "इस स्वैप को पूरा करने के लिए आपको अधिक $1 और $2 की आवश्यकता होगी", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "आपको और $1 चाहिए होगा ताकि इस स्वैप को स्मार्ट लेनदेन का इस्तेमाल करते हुए पूरा कर सके।", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "$1 उद्धरणों में से सर्वश्रेष्ठ।", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 1fabd1a343bf..6b5e18846bd1 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -3596,12 +3596,6 @@ "message": "Perubahan pasar yang terjadi secara tiba-tiba dapat menyebabkan kegagalan. Jika masalah berlanjut, hubungi $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Transaksi Pintar tidak tersedia untuk sementara waktu karena Anda memiliki transaksi yang tertunda." - }, - "stxFallbackUnavailable": { - "message": "Anda masih bisa menukar token meskipun Transaksi Pintar tidak tersedia." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Kirimkan Swap Anda secara pribadi..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Simulasikan transaksi sebelum dikirim untuk mengurangi biaya transaksi dan mengurangi kegagalan." }, - "stxTryRegular": { - "message": "Coba pertukaran biasa." - }, "stxTryingToCancel": { "message": "Mencoba membatalkan transaksi Anda..." }, - "stxUnavailable": { - "message": "Transaksi Pintar dinonaktifkan" - }, "stxUnknown": { "message": "Status tidak diketahui" }, @@ -3685,10 +3673,6 @@ "message": "Anda memerlukan $1 $2 lagi untuk menyelesaikan swap", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Anda memerlukan lebih banyak $1 untuk menyelesaikan pertukaran ini menggunakan transaksi pintar.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Kuotasi terbaik dari $1.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index f06f587de45b..9cf58873f988 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -3596,12 +3596,6 @@ "message": "突然の市場変動が失敗の原因になります。問題が解決されないようでしたら、$1 にお問い合わせください。", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "保留中のトランザクションがあるため、スマートトランザクションは一時的に利用できません。" - }, - "stxFallbackUnavailable": { - "message": "スマートトランザクションが利用できなくても、トークンのスワップは可能です。" - }, "stxPendingPrivatelySubmittingSwap": { "message": "スワップを非公開で送信中..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "送信前にトランザクションのシミュレーションを行い、トランザクションのコストと失敗率を減らします。" }, - "stxTryRegular": { - "message": "通常のスワップをお試しください。" - }, "stxTryingToCancel": { "message": "トランザクションのキャンセルを試みています..." }, - "stxUnavailable": { - "message": "スマートトランザクションが無効になっています" - }, "stxUnknown": { "message": "ステータス不明" }, @@ -3685,10 +3673,6 @@ "message": "このスワップを完了させるには、さらに$1の$2が必要です。", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "スマートトランザクションを使用してこのスワップを完了させるには、もっと $1 が必要です。", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "最善の$1の見積もり。", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index b9319686d4a9..bef385ac543a 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -3596,12 +3596,6 @@ "message": "시장 상황이 갑자기 변하면 실패할 수 있습니다. 문제가 지속되면 $1(으)로 문의하세요.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "대기 중인 거래가 있어 스마트 거래를 잠시 사용할 수 없습니다." - }, - "stxFallbackUnavailable": { - "message": "스마트 거래를 사용할 수 없을 때도 토큰 스왑은 가능합니다." - }, "stxPendingPrivatelySubmittingSwap": { "message": "스왑을 비공개로 제출하는 중..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "제출하기 전에 거래를 시뮬레이션하면 거래 비용을 줄이고 실패율을 낮출 수 있습니다." }, - "stxTryRegular": { - "message": "일반 스왑을 시도하세요." - }, "stxTryingToCancel": { "message": "거래를 취소하려고 합니다..." }, - "stxUnavailable": { - "message": "스마트 거래가 비활성화되었습니다." - }, "stxUnknown": { "message": "알 수 없는 상태" }, @@ -3685,10 +3673,6 @@ "message": "이 스왑을 완료하려면 $1개의 추가 $2이(가) 필요합니다.", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "스마트 거래로 이 스왑을 완료하려면 $1(이)가 더 많이 필요합니다.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "$1의 최고 견적", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 601d77dd3bf3..598a7f0e6b2a 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -3596,12 +3596,6 @@ "message": "Mudanças repentinas no mercado podem causar falhas. Se o problema persistir, entre em contato com $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "As Transações Inteligentes estão temporariamente indisponíveis porque você tem uma transação pendente." - }, - "stxFallbackUnavailable": { - "message": "Você ainda pode fazer swap com seus tokens mesmo quando as Transações Inteligentes estiverem indisponíveis." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Enviando seu swap de forma privada..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Simule as transações antes de finalizar para diminuir os custos de transação e reduzir a possibilidade de falhas." }, - "stxTryRegular": { - "message": "Tente fazer uma swap comum." - }, "stxTryingToCancel": { "message": "Tentando cancelar sua transação..." }, - "stxUnavailable": { - "message": "As Transações Inteligentes estão desativadas" - }, "stxUnknown": { "message": "Status desconhecido" }, @@ -3685,10 +3673,6 @@ "message": "Você precisa de mais $1 $2 para concluir essa troca", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Você precisa de mais $1 para completar esse swap usando transações inteligentes.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Melhores cotações de $1.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 3e74814de283..534215717902 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -3596,12 +3596,6 @@ "message": "Внезапные изменения на рынке могут привести к отказам. Если проблема не устранена, обратитесь по адресу $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Смарт-транзакции временно недоступны, так как у вас есть ожидающая транзакция." - }, - "stxFallbackUnavailable": { - "message": "Вы по-прежнему можете обменивать свои токены, даже если смарт-транзакции недоступны." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Приватная отправка вашей операции обмена..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Моделируйте транзакции перед отправкой, чтобы снизить транзакционные издержки и сократить число отказов." }, - "stxTryRegular": { - "message": "Попробуйте обычный обмен." - }, "stxTryingToCancel": { "message": "Попытка отменить транзакцию..." }, - "stxUnavailable": { - "message": "Смарт-транзакции отключены" - }, "stxUnknown": { "message": "Статус неизвестен" }, @@ -3685,10 +3673,6 @@ "message": "Вам нужно еще $1 $2 для завершения этого обмена", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Вам нужно больше $1, чтобы завершить этот обмен с использованием смарт-транзакций.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Лучшие котировки $1.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 850af882bd5f..6ab9dd945e77 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -3596,12 +3596,6 @@ "message": "Ang biglaang pagbabago sa merkado ay maaaring maging sanhi ng pagkabigo. Kung magpatuloy ang problema, makipag-ugnyan sa $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Pansamantalang hindi available ang mga Smart Transaction dahil mayroon kang nakabinbin na transaksyon." - }, - "stxFallbackUnavailable": { - "message": "Maaari mo parin papalitan ang iyong mga token kahit na hindi available ang mga Smart Transaction." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Pribadong isinusumite ang iyong Swap..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Gayahin ang mga transaksyon bago isumite upang bumaba ang gastos sa transaksyon at mabawasan ang mga pagkabigo." }, - "stxTryRegular": { - "message": "Subukan ang regular na pagpapalit." - }, "stxTryingToCancel": { "message": "Sinusubukang kanselahin ang iyong transaksyon..." }, - "stxUnavailable": { - "message": "Hindi pinapagana ang mga Smart Transaction" - }, "stxUnknown": { "message": "Hindi alam ang lagay" }, @@ -3685,10 +3673,6 @@ "message": "Kailangan mo ng $1 pa $2 para makumpleto ang pag-swap na ito", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Kailangan mo pa ng $1 para makumpleto ang pagpapalit na ito gamit ang mga smart transaction.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Pinakamaganda ng $1 na quote.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index cd1749176d98..fa8242dc9640 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -3596,12 +3596,6 @@ "message": "Ani piyasa değişiklikleri başarısızlıklara neden olabilir. Sorun devam ederse lütfen $1 ile iletişime geç.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Bekleyen bir işlemin olduğundan Akıllı İşlemler geçici olarak kullanılamıyor." - }, - "stxFallbackUnavailable": { - "message": "Akıllı İşlemler kullanılamazken bile token'larını değiştirebilirsin." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Swap işlemin özel olarak gönderiliyor..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "İşlem maliyetlerini azaltmak ve arızaları azaltmak için göndermeden önce işlemleri simüle et." }, - "stxTryRegular": { - "message": "Normal bir takas dene." - }, "stxTryingToCancel": { "message": "İşlemin iptal edilmeye çalışılıyor..." }, - "stxUnavailable": { - "message": "Akıllı İşlemler devre dışı bırakıldı" - }, "stxUnknown": { "message": "Durum bilinmiyor" }, @@ -3685,10 +3673,6 @@ "message": "Bu takası tamamlamak için $1 tane daha $2 gerekli", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Akıllı işlemleri kullanarak bu takası tamamlamak için daha fazla $1 lazım.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "En iyi $1 teklifleri.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index bf3aa2dc60d3..beba06a63776 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -3596,12 +3596,6 @@ "message": "Thị trường thay đổi đột ngột có thể gây thất bại. Nếu sự cố vẫn tiếp diễn, vui lòng liên hệ $1.", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "Giao dịch thông minh tạm thời không khả dụng vì bạn có một giao dịch đang chờ xử lý." - }, - "stxFallbackUnavailable": { - "message": "Bạn vẫn có thể hoán đổi token ngay cả khi Giao dịch thông minh không khả dụng." - }, "stxPendingPrivatelySubmittingSwap": { "message": "Đang bí mật gửi yêu cầu Hoán đổi của bạn..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "Mô phỏng giao dịch trước khi gửi để giảm chi phí giao dịch và tỷ lệ thất bại." }, - "stxTryRegular": { - "message": "Hãy thử hoán đổi thông thường." - }, "stxTryingToCancel": { "message": "Đang cố gắng hủy giao dịch của bạn..." }, - "stxUnavailable": { - "message": "Đã tắt Giao dịch thông minh" - }, "stxUnknown": { "message": "Trạng thái không xác định" }, @@ -3685,10 +3673,6 @@ "message": "Bạn cần $1 $2 nữa để hoàn tất giao dịch hoán đổi này", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "Bạn cần thêm $1 để hoàn thành hoán đổi này bằng các giao dịch thông minh.", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "Tốt nhất trong $1 báo giá.", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 43b618451b04..da62652140bd 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -3596,12 +3596,6 @@ "message": "突然的市场变化可能导致失败。如果问题仍然存在,请联系$1。", "description": "This message is shown to a user if their swap fails. The $1 will be replaced by support.metamask.io" }, - "stxFallbackPendingTx": { - "message": "智能交易暂时不可用,因为您有一笔待处理的交易。" - }, - "stxFallbackUnavailable": { - "message": "即使智能交易不可用,您仍然可以交换代币。" - }, "stxPendingPrivatelySubmittingSwap": { "message": "正在秘密提交您的Swap..." }, @@ -3625,15 +3619,9 @@ "stxTooltip": { "message": "在提交前模拟交易,以降低交易成本并减少失败。" }, - "stxTryRegular": { - "message": "尝试定期交换。" - }, "stxTryingToCancel": { "message": "正在尝试取消您的交易......" }, - "stxUnavailable": { - "message": "智能交易被禁用" - }, "stxUnknown": { "message": "状态未知" }, @@ -3685,10 +3673,6 @@ "message": "您还需要 $1 的 $2 来完成这笔交换", "description": "Tells the user how many more of a given token they need for a specific swap. $1 is an amount of tokens and $2 is the token symbol." }, - "swapApproveNeedMoreTokensSmartTransactions": { - "message": "您还需要更多$1才能使用智能交易完成此交换。", - "description": "Tells the user that they need more of a certain token ($1) before they can complete the swap via smart transactions." - }, "swapBestOfNQuotes": { "message": "$1 报价中最棒的。", "description": "$1 is the number of quotes that the user can select from when opening the list of quotes on the 'view quote' screen" diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index ac261ab6ad6c..2c10677f3257 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -129,7 +129,6 @@ export const createSwapsMockStore = () => { address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', occurances: 4, }, - currentSmartTransactionsErrorMessageDismissed: false, swapsSTXLoading: false, }, metamask: { diff --git a/ui/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js index 1e9fb41bcca8..6d35a8207cc4 100644 --- a/ui/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -124,7 +124,6 @@ const initialState = { fallBackPrice: null, }, currentSmartTransactionsError: '', - currentSmartTransactionsErrorMessageDismissed: false, swapsSTXLoading: false, }; @@ -211,9 +210,6 @@ const slice = createSlice({ : stxErrorTypes.UNAVAILABLE; state.currentSmartTransactionsError = errorType; }, - dismissCurrentSmartTransactionsErrorMessage: (state) => { - state.currentSmartTransactionsErrorMessageDismissed = true; - }, setSwapsSTXSubmitLoading: (state, action) => { state.swapsSTXLoading = action.payload || false; }, @@ -277,9 +273,6 @@ export const getSwapsFallbackGasPrice = (state) => export const getCurrentSmartTransactionsError = (state) => state.swaps.currentSmartTransactionsError; -export const getCurrentSmartTransactionsErrorMessageDismissed = (state) => - state.swaps.currentSmartTransactionsErrorMessageDismissed; - export function shouldShowCustomPriceTooLowWarning(state) { const { average } = getSwapGasPriceEstimateData(state); @@ -491,13 +484,11 @@ const { retrievedFallbackSwapsGasPrice, swapCustomGasModalClosed, setCurrentSmartTransactionsError, - dismissCurrentSmartTransactionsErrorMessage, setSwapsSTXSubmitLoading, } = actions; export { clearSwapsState, - dismissCurrentSmartTransactionsErrorMessage, setAggregatorMetadata, setBalanceError, setFetchingQuotes, diff --git a/ui/ducks/swaps/swaps.test.js b/ui/ducks/swaps/swaps.test.js index 547fa2af1ebd..209b5e63b658 100644 --- a/ui/ducks/swaps/swaps.test.js +++ b/ui/ducks/swaps/swaps.test.js @@ -358,15 +358,6 @@ describe('Ducks - Swaps', () => { }); }); - describe('getCurrentSmartTransactionsErrorMessageDismissed', () => { - it('returns currentSmartTransactionsErrorMessageDismissed', () => { - const state = createSwapsMockStore(); - expect( - swaps.getCurrentSmartTransactionsErrorMessageDismissed(state), - ).toBe(state.swaps.currentSmartTransactionsErrorMessageDismissed); - }); - }); - describe('shouldShowCustomPriceTooLowWarning', () => { it('returns false for showCustomPriceTooLowWarning', () => { const state = createSwapsMockStore(); @@ -774,21 +765,6 @@ describe('Ducks - Swaps', () => { }); }); - describe('dismissCurrentSmartTransactionsErrorMessage', () => { - it('calls the "swaps/dismissCurrentSmartTransactionsErrorMessage" action', () => { - const state = store.getState().swaps; - store.dispatch(swaps.dismissCurrentSmartTransactionsErrorMessage()); - const actions = store.getActions(); - expect(actions[0].type).toBe( - 'swaps/dismissCurrentSmartTransactionsErrorMessage', - ); - const newState = swapsReducer(state, actions[0]); - expect(newState.currentSmartTransactionsErrorMessageDismissed).toBe( - true, - ); - }); - }); - describe('setAggregatorMetadata', () => { it('calls the "swaps/setAggregatorMetadata" action', () => { const state = store.getState().swaps; diff --git a/ui/pages/swaps/index.js b/ui/pages/swaps/index.js index b62c9a9109d4..df7b3cc7d4c1 100644 --- a/ui/pages/swaps/index.js +++ b/ui/pages/swaps/index.js @@ -45,14 +45,11 @@ import { getSmartTransactionsEnabled, getCurrentSmartTransactionsEnabled, getCurrentSmartTransactionsError, - dismissCurrentSmartTransactionsErrorMessage, - getCurrentSmartTransactionsErrorMessageDismissed, navigateBackToBuildQuote, } from '../../ducks/swaps/swaps'; import { checkNetworkAndAccountSupports1559, currentNetworkTxListSelector, - getSwapsDefaultToken, } from '../../selectors'; import { AWAITING_SIGNATURES_ROUTE, @@ -85,14 +82,12 @@ import { useGasFeeEstimates } from '../../hooks/useGasFeeEstimates'; import FeatureToggledRoute from '../../helpers/higher-order-components/feature-toggled-route'; import { EVENT } from '../../../shared/constants/metametrics'; import { TransactionStatus } from '../../../shared/constants/transaction'; -import ActionableMessage from '../../components/ui/actionable-message'; import { MetaMetricsContext } from '../../contexts/metametrics'; import { getSwapsTokensReceivedFromTxMeta } from '../../../shared/lib/transactions-controller-utils'; import { fetchTokens, fetchTopAssets, fetchAggregatorMetadata, - stxErrorTypes, } from './swaps.util'; import AwaitingSignatures from './awaiting-signatures'; import SmartTransactionStatus from './smart-transaction-status'; @@ -135,7 +130,6 @@ export default function Swap() { const networkAndAccountSupports1559 = useSelector( checkNetworkAndAccountSupports1559, ); - const defaultSwapsToken = useSelector(getSwapsDefaultToken, isEqual); const tokenList = useSelector(getTokenList, isEqual); const shuffledTokensList = shuffle(Object.values(tokenList)); const reviewSwapClickedTimestamp = useSelector(getReviewSwapClickedTimestamp); @@ -151,11 +145,6 @@ export default function Swap() { const currentSmartTransactionsError = useSelector( getCurrentSmartTransactionsError, ); - const smartTransactionsErrorMessageDismissed = useSelector( - getCurrentSmartTransactionsErrorMessageDismissed, - ); - const showSmartTransactionsErrorMessage = - currentSmartTransactionsError && !smartTransactionsErrorMessageDismissed; useEffect(() => { const leaveSwaps = async () => { @@ -374,11 +363,6 @@ export default function Swap() { return <>; } - const isStxNotEnoughFundsError = - currentSmartTransactionsError === stxErrorTypes.NOT_ENOUGH_FUNDS; - const isRegularTxInProgressError = - currentSmartTransactionsError === stxErrorTypes.REGULAR_TX_IN_PROGRESS; - return (
@@ -408,53 +392,6 @@ export default function Swap() {
- {showSmartTransactionsErrorMessage && ( - - {t('swapApproveNeedMoreTokensSmartTransactions', [ - defaultSwapsToken.symbol, - ])}{' '} - - dispatch(dismissCurrentSmartTransactionsErrorMessage()) - } - style={{ - textDecoration: 'underline', - cursor: 'pointer', - }} - > - {t('stxTryRegular')} - -
- ) : ( -
-
- ) - } - className={ - isStxNotEnoughFundsError - ? 'swaps__error-message' - : 'actionable-message--left-aligned actionable-message--warning swaps__error-message' - } - /> - )}