1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Enable buying MATIC on Polygon, BNB on BSC, AVAX on Avalanche, FTM on Fantom, CELO on Celo, and respective stablecoins on Transak (#13398)

This commit is contained in:
David Walsh 2022-01-28 07:46:26 -06:00 committed by GitHub
parent 8d2d64a32f
commit 851fce9a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 244 additions and 484 deletions

View File

@ -283,9 +283,6 @@
"deleteNetworkDescription": {
"message": "ይህን አውታረ መረብ ለመሰረዝ እንደሚፈልጉ እርግጠኛ ነዎት?"
},
"depositEther": {
"message": "Ether አስቀምጥ"
},
"details": {
"message": "ዝርዝሮች"
},
@ -581,9 +578,6 @@
"myAccounts": {
"message": "የእኔ መለያዎች"
},
"needEtherInWallet": {
"message": "MetaMask በመጠቀም ያልተማከሉ መተግበሪያዎች ጋር ግንኙነት ለማድረግ፣ በቋትዎ ውስጥ Ether ያስፈልግዎታል።"
},
"needImportFile": {
"message": "የሚያስመጡትን ፋይል መምረጥ አለብዎት።",
"description": "User is important an account and needs to add a file to continue"

View File

@ -300,9 +300,6 @@
"deleteNetworkDescription": {
"message": "هل أنت متأكد أنك تريد حذف هذه الشبكة؟"
},
"depositEther": {
"message": "إيداع عملة إيثير"
},
"details": {
"message": "التفاصيل"
},
@ -597,9 +594,6 @@
"myAccounts": {
"message": "حساباتي"
},
"needEtherInWallet": {
"message": "للتفاعل مع التطبيقات اللامركزية باستخدام MetaMask، ستحتاج إلى الإيثير في محفظتك."
},
"needImportFile": {
"message": "يلزم تحديد ملف للاستيراد.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Наистина ли искате да изтриете тази мрежа?"
},
"depositEther": {
"message": "Депозирайте етер"
},
"details": {
"message": "Подробности"
},
@ -592,9 +589,6 @@
"myAccounts": {
"message": "Моите акаунти"
},
"needEtherInWallet": {
"message": "За да взаимодействате с децентрализираните приложения, използвайки MetaMask, ще ви е необходим етер в портфейла ви."
},
"needImportFile": {
"message": "Трябва да изберете файл за импортиране.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "আপনি কি এই নেটওয়ার্কটি মোছার বিষয়ে নিশ্চিত?"
},
"depositEther": {
"message": "ইথার জমা করুন"
},
"details": {
"message": "বিশদ বিবরণ"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "আমার অ্যাকাউন্টগুলি"
},
"needEtherInWallet": {
"message": "MetaMask ব্যবহার করে ছড়িয়ে ছিটিয়ে থাকা অ্যাপ্লিকেশনগুলির সাথে যোগাযোগ করতে, আপনার ওয়ালেটে ইথার লাগবে।"
},
"needImportFile": {
"message": "আমদানি করার জন্য আপনাকে অবশ্যই একটি ফাইল নির্বাচন করতে হবে।",
"description": "User is important an account and needs to add a file to continue"

View File

@ -289,9 +289,6 @@
"deleteNetworkDescription": {
"message": "Estàs segur que vols eliminar aquesta xarxa?"
},
"depositEther": {
"message": "Diposita Ether"
},
"details": {
"message": "Detalls"
},
@ -580,9 +577,6 @@
"myAccounts": {
"message": "Els meus Comptes"
},
"needEtherInWallet": {
"message": "Per a interactuar amb aplicacions descentralitzades fent servir MetaMask, necessitaràs Ether al teu moneder."
},
"needImportFile": {
"message": "Has de seleccionar un arxiu per a importar.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -108,9 +108,6 @@
"decimalsMustZerotoTen": {
"message": "Desetinných míst musí být od 0 do 36."
},
"depositEther": {
"message": "Vložit Ether"
},
"details": {
"message": "Podrobnosti"
},
@ -246,9 +243,6 @@
"myAccounts": {
"message": "Moje účty"
},
"needEtherInWallet": {
"message": "Potřebujete Ether v peněžence, abyste mohli pomocí MetaMasku interagovat s decentralizovanými aplikacemi."
},
"needImportFile": {
"message": "Musíte zvolit soubor k importu.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Er du sikker på, at du vil slette dette netværk?"
},
"depositEther": {
"message": "Indbetal Ether"
},
"details": {
"message": "Detaljer"
},
@ -580,9 +577,6 @@
"myAccounts": {
"message": "Mine Konti"
},
"needEtherInWallet": {
"message": "Du skal have Ether i din tegnebog for at interagere med decentraliserede applikationer, der bruger MetaMask."
},
"needImportFile": {
"message": "Du skal vælge en fil, der skal importeres.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -283,9 +283,6 @@
"deleteNetworkDescription": {
"message": "Sind Sie sicher, dass Sie dieses Netzwerk löschen möchten?"
},
"depositEther": {
"message": "Ether einzahlen"
},
"directDepositEther": {
"message": "Sofort Ether einzahlen"
},
@ -569,9 +566,6 @@
"myAccounts": {
"message": "Meine Accounts"
},
"needEtherInWallet": {
"message": "Um dezentralisierte Applikationen mit MetaMask verwenden zu können, benötigst du Ether in deiner Wallet."
},
"needImportFile": {
"message": "Für den Import musst du eine Datei auswählen.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Αγορά"
},
"buyWithTransak": {
"message": "Αγοράστε ETH με Transak"
},
"buyWithTransakDescription": {
"message": "Η Transak υποστηρίζει χρεωστική κάρτα και τραπεζικές μεταφορές (ανάλογα με τη τοποθεσία σας) σε 59+ χώρες. Το ETH κατατίθεται στο λογαριασμό σας MetaMask."
},
"buyWithWyre": {
"message": "Αγοράστε ETH με το Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Θέλετε σίγουρα να διαγράψετε αυτό το δίκτυο;"
},
"depositEther": {
"message": "Κατάθεση Ether"
},
"description": {
"message": "Περιγραφή"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Όνομα"
},
"needEtherInWallet": {
"message": "Για να αλληλεπιδράσετε με αποκεντρωμένες εφαρμογές χρησιμοποιώντας το MetaMask, θα χρειαστείτε Ether στο πορτοφόλι σας."
},
"needHelp": {
"message": "Χρειάζεστε βοήθεια? Επικοινωνήστε με $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -389,11 +389,13 @@
"buy": {
"message": "Buy"
},
"buyWithTransak": {
"message": "Buy ETH with Transak"
"buyCryptoWithTransak": {
"message": "Buy $1 with Transak",
"description": "$1 represents the cypto symbol to be purchased"
},
"buyWithTransakDescription": {
"message": "Transak supports debit card and bank transfers (depending on location) in 59+ countries. ETH deposits into your MetaMask account."
"buyCryptoWithTransakDescription": {
"message": "Transak supports debit card and bank transfers (depending on location) in 59+ countries. $1 deposits into your MetaMask account.",
"description": "$1 represents the cypto symbol to be purchased"
},
"buyWithWyre": {
"message": "Buy ETH with Wyre"
@ -745,8 +747,9 @@
"deleteNetworkDescription": {
"message": "Are you sure you want to delete this network?"
},
"depositEther": {
"message": "Deposit Ether"
"depositCrypto": {
"message": "Deposit $1",
"description": "$1 represents the cypto symbol to be purchased"
},
"description": {
"message": "Description"
@ -1796,8 +1799,9 @@
"name": {
"message": "Name"
},
"needEtherInWallet": {
"message": "To interact with decentralized applications using MetaMask, youll need Ether in your wallet."
"needCryptoInWallet": {
"message": "To interact with decentralized applications using MetaMask, youll need $1 in your wallet.",
"description": "$1 represents the cypto symbol to be purchased"
},
"needHelp": {
"message": "Need help? Contact $1",

View File

@ -516,9 +516,6 @@
"deleteNetworkDescription": {
"message": "¿Está seguro de que quiere eliminar esta red?"
},
"depositEther": {
"message": "Depositar ether"
},
"details": {
"message": "Detalles"
},
@ -1100,9 +1097,6 @@
"name": {
"message": "Nombre"
},
"needEtherInWallet": {
"message": "Para interactuar con aplicaciones descentralizadas mediante MetaMask, necesitará ethers en su cartera."
},
"needHelp": {
"message": "¿Necesita ayuda? Comuníquese con $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -525,9 +525,6 @@
"deleteNetworkDescription": {
"message": "¿Está seguro de que quiere eliminar esta red?"
},
"depositEther": {
"message": "Depositar ether"
},
"details": {
"message": "Detalles"
},
@ -1112,9 +1109,6 @@
"name": {
"message": "Nombre"
},
"needEtherInWallet": {
"message": "Para interactuar con aplicaciones descentralizadas mediante MetaMask, necesitará ethers en su cartera."
},
"needHelp": {
"message": "¿Necesita ayuda? Comuníquese con $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Olete kindel, et soovite selle võrgu kustutada?"
},
"depositEther": {
"message": "Eetri sissemakse"
},
"details": {
"message": "Üksikasjad"
},
@ -586,9 +583,6 @@
"myAccounts": {
"message": "Minu kontod"
},
"needEtherInWallet": {
"message": "Selleks, et suhelda MetaMaski abil detsentraliseeritud rakendustega, peab teil rahakotis eetrit olema."
},
"needImportFile": {
"message": "Peate importimiseks faili valima.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "آیا مطمئن هستید که این شبکه حذف شود؟"
},
"depositEther": {
"message": "پرداخت ایتر"
},
"details": {
"message": "جزئیات"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "حساب های من"
},
"needEtherInWallet": {
"message": "برای تعامل با اپلیکیشن های غیر متمرکز شده با استفاده از MetaMask، شما نیاز به ایتر در کیف تان خواهید داشت."
},
"needImportFile": {
"message": "شما باید یک فایل برای وارد کردن را انتخاب کنید.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Haluatko varmasti poistaa tämän verkon?"
},
"depositEther": {
"message": "Talleta Etheriä"
},
"details": {
"message": "Tiedot"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "Omat tilit"
},
"needEtherInWallet": {
"message": "Ollaksesi vuorovaikutuksessa hajautettujen sovellusten kanssa sinulla on oltava lompakossasi Ether."
},
"needImportFile": {
"message": "Sinun tarvitsee valita tuotava tiedosto.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -268,9 +268,6 @@
"deleteNetworkDescription": {
"message": "Sigurado ka bang gusto mong i-delete ang network na ito?"
},
"depositEther": {
"message": "Magdeposito ng Ether"
},
"details": {
"message": "Mga Detalye"
},
@ -534,9 +531,6 @@
"myAccounts": {
"message": "Mga Account Ko"
},
"needEtherInWallet": {
"message": "Para gumamit ng mga decentralized na application gamit ang MetaMask, mangangailangan ka ng Ether sa iyong wallet."
},
"needImportFile": {
"message": "Dapat kang pumili ng file na ii-import.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Acheter"
},
"buyWithTransak": {
"message": "Achetez des ETH avec Transak"
},
"buyWithTransakDescription": {
"message": "Transak prend en charge les cartes de débit et les virements bancaires (en fonction de lemplacement) dans plus de 59 pays. Les ETH sont ensuite déposés sur votre compte MetaMask."
},
"buyWithWyre": {
"message": "Acheter ETH avec Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Êtes-vous sûr de vouloir supprimer ce réseau ?"
},
"depositEther": {
"message": "Déposer de l'Ether"
},
"description": {
"message": "Description"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Nom"
},
"needEtherInWallet": {
"message": "Pour interagir avec des applications décentralisées à l'aide de MetaMask, vous avez besoin d'Ether dans votre portefeuille."
},
"needHelp": {
"message": "Vous avez besoin daide? Contactez $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "הנך בטוח/ה שברצונך למחוק רשת זו?"
},
"depositEther": {
"message": "הפקדת את'ר"
},
"details": {
"message": "פרטים"
},
@ -593,9 +590,6 @@
"myAccounts": {
"message": "החשבונות שלי"
},
"needEtherInWallet": {
"message": "כדי לתקשר עם אפליקציות מבוזרות באמצעות MetaMask, צריך להיות לך את'ר בארנק."
},
"needImportFile": {
"message": "יש לבחור קובץ לייצוא.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "खरीदें"
},
"buyWithTransak": {
"message": "Transak के साथ ETH खरीदें"
},
"buyWithTransakDescription": {
"message": "Transak 59+ देशों में डेबिट कार्ड और बैंक हस्तांतरण (स्थान के आधार पर) का समर्थन करता है। ETH आपके MetaMask अकाउंट में जमा करता है।"
},
"buyWithWyre": {
"message": "ETH को Wyre साथ खरीदें"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "क्या आप वाकई इस नेटवर्क को हटाना चाहते हैं?"
},
"depositEther": {
"message": "Ether जमा करें"
},
"description": {
"message": "विवरण"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "नाम"
},
"needEtherInWallet": {
"message": "MetaMask का उपयोग करके विकेंद्रीकृत एप्लिकेशन के साथ सहभागिता करने के लिए, आपको अपने वॉलेट में Ether की आवश्यकता होगी।"
},
"needHelp": {
"message": "मदद चाहिए? $1 से संपर्क करें",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -84,9 +84,6 @@
"decimalsMustZerotoTen": {
"message": "दशमलव कम से कम 0 होनी चाहिए, और 36 से अधिक नहीं होनी चाहिए।"
},
"depositEther": {
"message": "जमा - Ether"
},
"details": {
"message": "संदेश विवरण"
},
@ -223,9 +220,6 @@
"myAccounts": {
"message": "मेरे खाते"
},
"needEtherInWallet": {
"message": "मेटामास्क का उपयोग करने वाले विकेन्द्रीकृत अनुप्रयोगों के साथ बातचीत करने के लिए, आपको अपने वॉलेट में ईथर की आवश्यकता होगी।"
},
"needImportFile": {
"message": "आयात करने के लिए आपको एक फ़ाइल का चयन करना होगा।",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Sigurno želite izbrisati ovu mrežu?"
},
"depositEther": {
"message": "Položi Ether"
},
"details": {
"message": "Detalji"
},
@ -589,9 +586,6 @@
"myAccounts": {
"message": "Moji računi"
},
"needEtherInWallet": {
"message": "Trebate Ether u svojem novčaniku kako biste ostvarili interakciju s decentraliziranim aplikacijama uporabom usluge MetaMask. "
},
"needImportFile": {
"message": "Morate odabrati datoteku za uvoz.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -159,9 +159,6 @@
"decimalsMustZerotoTen": {
"message": "Desimal yo dwe omwen 0, epi pa dwe plis pase 36."
},
"depositEther": {
"message": "Depo Ether"
},
"details": {
"message": "Detay yo"
},
@ -355,9 +352,6 @@
"myAccounts": {
"message": "Kont mwen"
},
"needEtherInWallet": {
"message": "Pou kominike avèk aplikasyon desantralize ou dwe itilize MetaMask, ou pral bezwen Ether nan Wallet ou."
},
"needImportFile": {
"message": "Ou dwe chwazi yon dosye pou enpòte.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Biztosan törli ezt a hálózatot?"
},
"depositEther": {
"message": "Ether befizetése"
},
"details": {
"message": "Részletek"
},
@ -589,9 +586,6 @@
"myAccounts": {
"message": "Fiókjaim"
},
"needEtherInWallet": {
"message": "Ha a MetaMaskon keresztül szeretne interakcióba lépni decentralizált alkalmazással, ahhoz a tárcájában Ethernek kell lennie."
},
"needImportFile": {
"message": "Ki kell választania az importálni kívánt fájlt.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Beli"
},
"buyWithTransak": {
"message": "Beli ETH dengan Transak"
},
"buyWithTransakDescription": {
"message": "Transak mendukung kartu debit dan transfer bank (tergantung lokasi) di 59+ negara. Deposito ETH ke akun MetaMask Anda."
},
"buyWithWyre": {
"message": "Beli ETH dengan Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Anda yakin ingin menghapus jaringan ini?"
},
"depositEther": {
"message": "Depositokan Ether"
},
"description": {
"message": "Deskripsi"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Nama"
},
"needEtherInWallet": {
"message": "Untuk berinteraksi dengan aplikasi yang terdesentralisasi menggunakan MetaMask, Anda memerlukan Ether di dompet Anda."
},
"needHelp": {
"message": "Butuh bantuan? Hubungi $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -450,9 +450,6 @@
"deleteNetworkDescription": {
"message": "Sei sicuro di voler eliminare questa rete?"
},
"depositEther": {
"message": "Deposita Ether"
},
"details": {
"message": "Dettagli"
},
@ -948,9 +945,6 @@
"myAccounts": {
"message": "Miei Account"
},
"needEtherInWallet": {
"message": "Per interagire con applicazioni decentralizzate con MetaMask, devi possedere Ether nel tuo portafoglio."
},
"needImportFile": {
"message": "Devi selezionare un file da importare.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "購入"
},
"buyWithTransak": {
"message": "TransakでETHを購入"
},
"buyWithTransakDescription": {
"message": "Transakは59か国以上でデビットカードと銀行振込 (場所によって異なります) をサポートしています。ETHはMetaMaskアカウントに入金されます。"
},
"buyWithWyre": {
"message": "Wyre で ETH を購入"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "このネットワークを削除しますか?"
},
"depositEther": {
"message": "Ether 入金"
},
"description": {
"message": "説明"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "名前"
},
"needEtherInWallet": {
"message": "MetaMask を使用して分散型アプリケーションとやりとりするには、ウォレットに Ether が必要です。"
},
"needHelp": {
"message": "お手伝いしましょうか?$1 に連絡",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "ನೀವು ಈ ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ಖಚಿತವಾಗಿ ಅಳಿಸಲು ಬಯಸುತ್ತೀರಾ?"
},
"depositEther": {
"message": "ಎಥರ್ ಠೇವಣಿ ಮಾಡಿ"
},
"details": {
"message": "ವಿವರಗಳು"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "ನನ್ನ ಖಾತೆಗಳು"
},
"needEtherInWallet": {
"message": "MetaMask ಬಳಸಿಕೊಂಡು ವಿಕೇಂದ್ರೀಕೃತ ಖಾತೆಗಳೊಂದಿಗೆ ಸಂವಹನ ನಡೆಸಲು, ನಿಮ್ಮ ವ್ಯಾಲೆಟ್‌ನಲ್ಲಿ ನಿಮಗೆ ಎಥರ್ ಅಗತ್ಯವಿದೆ."
},
"needImportFile": {
"message": "ಆಮದು ಮಾಡಲು ನೀವು ಫೈಲ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಬೇಕು.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "구매"
},
"buyWithTransak": {
"message": "Transak으로 ETH 구매"
},
"buyWithTransakDescription": {
"message": "Transak은 59개 이상의 국가에서 직불 카드 및 은행 송금(지역에 따라 다름)을 지원합니다. ETH는 메타마스크 계정에 예치됩니다."
},
"buyWithWyre": {
"message": "Wyre로 ETH 구매"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "이 네트워크를 삭제하시겠어요?"
},
"depositEther": {
"message": "Ether 예치"
},
"description": {
"message": "설명"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "이름"
},
"needEtherInWallet": {
"message": "MetaMask를 이용하는 분산형 애플리케이션과 상호작용하려면 지갑에 Ether가 있어야 합니다."
},
"needHelp": {
"message": "도움이 필요하신가요? $1에 문의하세요.",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Ar tikrai norite panaikinti šį tinklą?"
},
"depositEther": {
"message": "Įnešti eterių"
},
"details": {
"message": "Išsami informacija"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "Mano paskyros"
},
"needEtherInWallet": {
"message": "Norėdami dirbti su decentralizuotomis programomis „MetaMask“, savo piniginėje turite turėti eterių."
},
"needImportFile": {
"message": "Turite pasirinkti failą, kurį pageidaujate importuoti.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Vai tiešām vēlaties dzēst šo tīklu?"
},
"depositEther": {
"message": "Noguldīt Ether"
},
"details": {
"message": "Informācija"
},
@ -592,9 +589,6 @@
"myAccounts": {
"message": "Mani konti"
},
"needEtherInWallet": {
"message": "Lai izmantotu decentralizētas lietotnes ar MetaMask, jūsu makā jābūt Ether."
},
"needImportFile": {
"message": "Jums jāatlasa fails, ko importēt",
"description": "User is important an account and needs to add a file to continue"

View File

@ -576,9 +576,6 @@
"myAccounts": {
"message": "Akaun Saya"
},
"needEtherInWallet": {
"message": "Untuk berinteraksi dengan aplikasi ternyahpusat menggunakan MetaMask, anda memerlukan Ether di dalam dompet anda."
},
"needImportFile": {
"message": "Anda mesti pilih fail untuk diimport.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -84,9 +84,6 @@
"decimalsMustZerotoTen": {
"message": "Decimalen moeten minimaal 0 en niet meer dan 36 zijn."
},
"depositEther": {
"message": "Stort Ether"
},
"directDepositEther": {
"message": "Directe Ether storten"
},
@ -217,9 +214,6 @@
"myAccounts": {
"message": "Mijn accounts"
},
"needEtherInWallet": {
"message": "Om te communiceren met gedecentraliseerde applicaties met MetaMask, heb je Ether nodig in je portemonnee."
},
"needImportFile": {
"message": "U moet een bestand selecteren om te importeren.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -289,9 +289,6 @@
"deleteNetworkDescription": {
"message": "Er du sikker på at du vil slette dette nettverket?"
},
"depositEther": {
"message": "Sett inn Ether "
},
"details": {
"message": "Detaljer"
},
@ -583,9 +580,6 @@
"myAccounts": {
"message": "Mine kontoer "
},
"needEtherInWallet": {
"message": "Du må ha Ether i lommeboken din for å samhandle med desentraliserte applikasjoner gjennom MateMask."
},
"needImportFile": {
"message": "Du må velge en fil å importere.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -519,9 +519,6 @@
"deleteNetworkDescription": {
"message": "Sigurado ka bang gusto mong i-delete ang network na ito?"
},
"depositEther": {
"message": "Mag-deposit ng Ether"
},
"details": {
"message": "Mga Detalye"
},
@ -1116,9 +1113,6 @@
"name": {
"message": "Pangalan"
},
"needEtherInWallet": {
"message": "Para makaugnayan ang mga decentralized na application gamit ang MetaMask, kakailanganin mo ang Ether sa iyong wallet."
},
"needHelp": {
"message": "Kailangan ng tulong? Makipag-ugnayan sa $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Czy na pewno chcesz usunąć tę sieć?"
},
"depositEther": {
"message": "Zdeponuj Eter"
},
"details": {
"message": "Szczegóły"
},
@ -593,9 +590,6 @@
"myAccounts": {
"message": "Moje konta"
},
"needEtherInWallet": {
"message": "Żeby skorzystać ze zdecentraliowanych aplikacji (dApps) przy pomocy MetaMask, potrzebujesz Eteru w swoim portfelu."
},
"needImportFile": {
"message": "Musisz wybrać plik do zaimportowania.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -84,9 +84,6 @@
"decimalsMustZerotoTen": {
"message": "Decimais devem ser no mínimo 0 e não passar de 36."
},
"depositEther": {
"message": "Depositar Ether"
},
"details": {
"message": "Detalhes"
},
@ -220,9 +217,6 @@
"myAccounts": {
"message": "As minhas contas"
},
"needEtherInWallet": {
"message": "Para interagir com applicações descentralizadas usando MetaMask tem de ter Ether na sua carteira."
},
"needImportFile": {
"message": "Deve selecionar um ficheiro para importar.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -519,9 +519,6 @@
"deleteNetworkDescription": {
"message": "Tem certeza de que deseja excluir esta rede?"
},
"depositEther": {
"message": "Depositar ether"
},
"details": {
"message": "Detalhes"
},
@ -1100,9 +1097,6 @@
"name": {
"message": "Nome"
},
"needEtherInWallet": {
"message": "Para interagir com aplicativos descentralizados usando o MetaMask, você precisará de ethers na sua carteira."
},
"needHelp": {
"message": "Precisa de ajuda? Contato $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Sigur vreți să ștergeți această rețea?"
},
"depositEther": {
"message": "Depuneți Ether"
},
"details": {
"message": "Detalii"
},
@ -583,9 +580,6 @@
"myAccounts": {
"message": "Conturile mele"
},
"needEtherInWallet": {
"message": "Pentru a interacționa cu aplicațiile descentralizate prin intermediul MetaMask, trebuie să aveți Ether în portofel."
},
"needImportFile": {
"message": "Trebuie să selectați un fișier pentru importare.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Купить"
},
"buyWithTransak": {
"message": "Купить ETH с помощью Transak"
},
"buyWithTransakDescription": {
"message": "Transak поддерживает дебетовые карты и банковские переводы (в зависимости от местоположения) в 59 странах. ETH будут зачислены на ваш счет MetaMask."
},
"buyWithWyre": {
"message": "Купить ETH с Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Вы уверены, что хотите удалить эту сеть?"
},
"depositEther": {
"message": "Внести Ether"
},
"description": {
"message": "Описание"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Название"
},
"needEtherInWallet": {
"message": "Для взаимодействия с децентрализованными приложениями с помощью MetaMask вам понадобится Ether в вашем кошельке."
},
"needHelp": {
"message": "Нужна помощь? Обратитесь в $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -286,9 +286,6 @@
"deleteNetworkDescription": {
"message": "Naozaj chcete túto sieť odstrániť?"
},
"depositEther": {
"message": "Vložit Ether"
},
"details": {
"message": "Podrobnosti"
},
@ -568,9 +565,6 @@
"myAccounts": {
"message": "Moje účty"
},
"needEtherInWallet": {
"message": "Potřebujete Ether v peněžence, abyste mohli pomocí MetaMasku interagovat s decentralizovanými aplikacemi."
},
"needImportFile": {
"message": "Musíte zvolit soubor k importu.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Ali ste prepričani, da želite izbrisati to omrežje?"
},
"depositEther": {
"message": "Vplačilo ethra"
},
"details": {
"message": "Podrobnosti"
},
@ -584,9 +581,6 @@
"myAccounts": {
"message": "Moji računi"
},
"needEtherInWallet": {
"message": "Za interakcijo z decentraliziranimi aplikacijami boste v svoji denarnici potrebovali Eter."
},
"needImportFile": {
"message": "Za uvoz morate izbrati datoteko.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -289,9 +289,6 @@
"deleteNetworkDescription": {
"message": "Da li ste sigurni da želite da izbrišete ovu mrežu?"
},
"depositEther": {
"message": "Dajte depozit Ether-u"
},
"details": {
"message": "Детаљи"
},
@ -587,9 +584,6 @@
"myAccounts": {
"message": "Moji nalozi"
},
"needEtherInWallet": {
"message": "Da biste stupili u interakciju sa decentralizovanim aplikacijama koristeći MetaMask, biće vam potreban Ether u vašem novčaniku."
},
"needImportFile": {
"message": "Morate izabrati fajl koji ćete uvesti.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -286,9 +286,6 @@
"deleteNetworkDescription": {
"message": "Är du säker på att du vill ta bort detta nätverk?"
},
"depositEther": {
"message": "Sätt in Ether"
},
"details": {
"message": "Info"
},
@ -580,9 +577,6 @@
"myAccounts": {
"message": "Mina konton"
},
"needEtherInWallet": {
"message": "För att interagera med decentraliserade applikationer med MetaMask behöver du Ether i din plånbok."
},
"needImportFile": {
"message": "Du måste välja en fil att importera.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -286,9 +286,6 @@
"deleteNetworkDescription": {
"message": "Una uhakika unataka kufuta mtandao huu?"
},
"depositEther": {
"message": "Weka Ether"
},
"details": {
"message": "Maelezo"
},
@ -574,9 +571,6 @@
"myAccounts": {
"message": "Akaunti zangu"
},
"needEtherInWallet": {
"message": "Ili kuingiliana na programu zilizosambazwa kwa kutumia MetaMask, utahitaji kuwa na Ether kwenye waleti yako."
},
"needImportFile": {
"message": "Unapaswa kuchagua faili la kuhamisha.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -129,9 +129,6 @@
"delete": {
"message": "நீக்கு"
},
"depositEther": {
"message": "வைப்புத்தொகை எதிர் "
},
"details": {
"message": "விவரங்கள்"
},
@ -295,9 +292,6 @@
"myAccounts": {
"message": "எனது கணக்குகள்"
},
"needEtherInWallet": {
"message": "மேடமஸ்க் ஐ பயன்படுத்தி பரவலாக்கப்பட்ட பயன்பாடுகளுடன் தொடர்பு கொள்ள, உங்கள் பணப்பரிமாற்றத்தில் ஈதர் தேவை."
},
"needImportFile": {
"message": "இறக்குமதி செய்ய ஒரு கோப்பை நீங்கள் தேர்ந்தெடுக்க வேண்டும்.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -132,9 +132,6 @@
"deleteNetwork": {
"message": "ลบเครือข่าย?"
},
"depositEther": {
"message": "การฝากอีเธอร์"
},
"details": {
"message": "รายละเอียด"
},
@ -301,9 +298,6 @@
"myAccounts": {
"message": "บัญชีของฉัน"
},
"needEtherInWallet": {
"message": "คุณจะต้องมีอีเธอร์ในกระเป๋าเงินของคุณในการใช้งานกับแอพพลิเคชันแบบกระจายด้วย MetaMask"
},
"needImportFile": {
"message": "คุณต้องเลือกไฟล์ที่จะนำเข้า",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Bilhin"
},
"buyWithTransak": {
"message": "Bumili ng ETH gamit ang Transak"
},
"buyWithTransakDescription": {
"message": "Magagamit sa Transak ang debit card at mga bank transfer (depende sa lokasyon) sa 59+ na bansa. Mga depositong ETH sa iyong MetaMask account."
},
"buyWithWyre": {
"message": "Bumili ng ETH gamit ang Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Sigurado ka bang gusto mong i-delete ang network na ito?"
},
"depositEther": {
"message": "Mag-deposit ng Ether"
},
"description": {
"message": "Deskripsyon"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Pangalan"
},
"needEtherInWallet": {
"message": "Para makaugnayan ang mga decentralized ma application gamit ang MetaMask, kakailanganin mo ang Ether sa iyong wallet."
},
"needHelp": {
"message": "Kailangan ng tulong? Kontakin ang $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Satın Al"
},
"buyWithTransak": {
"message": "Transak ile ETH satın alın"
},
"buyWithTransakDescription": {
"message": "Transak 59'dan fazla ülkede banka kartı ve banka transferlerini (konuma bağlı olarak) destekler. MetaMask hesabınıza ETH para yatırma işlemleri."
},
"buyWithWyre": {
"message": "Wyre ile ETH satın alın"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Bu ağı silmek istediğinizden emin misiniz?"
},
"depositEther": {
"message": "Ether yatır"
},
"description": {
"message": "Açıklama"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Adı"
},
"needEtherInWallet": {
"message": "MetaMask kullanarak merkezi olamayan uygulamalarla etkileşmek için cüzdanınızda Ether bulunmalıdır."
},
"needHelp": {
"message": "Yardıma mı ihtiyacınız var? $1 ile iletişim kurun",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "Ви впевнені, що хочете видалити цю мережу?"
},
"depositEther": {
"message": "Депонувати Ether"
},
"details": {
"message": "Деталі"
},
@ -596,9 +593,6 @@
"myAccounts": {
"message": "Мої облікові записи"
},
"needEtherInWallet": {
"message": "Щоб взаємодіяти з децентралізованими застосунками використовуючи MetaMask, вам буде потрібен Ether у вашому гаманці."
},
"needImportFile": {
"message": "Потрібно вибрати файл для імпорту.",
"description": "User is important an account and needs to add a file to continue"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "Mua"
},
"buyWithTransak": {
"message": "Mua ETH bằng Transak"
},
"buyWithTransakDescription": {
"message": "Transak hỗ trợ thẻ ghi nợ và chuyển khoản ngân hàng (tùy vào địa điểm) tại hơn 59 quốc gia. Nạp ETH vào tài khoản MetaMask của bạn."
},
"buyWithWyre": {
"message": "Mua ETH qua Wyre"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "Bạn có chắc chắn muốn xóa mạng này không?"
},
"depositEther": {
"message": "Nộp Ether"
},
"description": {
"message": "Mô tả"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "Tên"
},
"needEtherInWallet": {
"message": "Để tương tác với các ứng dụng phi tập trung bằng MetaMask, bạn sẽ cần phải có Ether trong ví của mình."
},
"needHelp": {
"message": "Bạn cần trợ giúp? Liên hệ $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -389,12 +389,6 @@
"buy": {
"message": "购买"
},
"buyWithTransak": {
"message": "使用Transak购买ETH"
},
"buyWithTransakDescription": {
"message": "Transak 支持在59多个国家地区的借记卡和银行转账取决于地点。ETH可存款到您的MetaMask账户。"
},
"buyWithWyre": {
"message": "使用 Wyre 购买 ETH"
},
@ -721,9 +715,6 @@
"deleteNetworkDescription": {
"message": "是否确认要删除该网络?"
},
"depositEther": {
"message": "存入 Ether"
},
"description": {
"message": "描述"
},
@ -1702,9 +1693,6 @@
"name": {
"message": "名称"
},
"needEtherInWallet": {
"message": "使用 MetaMask 与分布式应用交互,需要您的钱包里需要有 Ether。"
},
"needHelp": {
"message": "需要帮助?请联系 $1",
"description": "$1 represents `needHelpLinkText`, the text which goes in the help link"

View File

@ -292,9 +292,6 @@
"deleteNetworkDescription": {
"message": "你確定要刪除網路嗎?"
},
"depositEther": {
"message": "存入以太幣"
},
"details": {
"message": "詳情"
},
@ -590,9 +587,6 @@
"myAccounts": {
"message": "我的帳戶"
},
"needEtherInWallet": {
"message": "要使用 MetaMask 存取去中心化應用服務時,您的錢包中需要有以太幣。"
},
"needImportFile": {
"message": "您必須選擇一個檔案來匯入",
"description": "User is important an account and needs to add a file to continue"

View File

@ -1,75 +0,0 @@
import nock from 'nock';
import {
KOVAN_CHAIN_ID,
MAINNET_CHAIN_ID,
RINKEBY_CHAIN_ID,
ROPSTEN_CHAIN_ID,
} from '../../../shared/constants/network';
import { TRANSAK_API_KEY } from '../constants/on-ramp';
import { SWAPS_API_V2_BASE_URL } from '../../../shared/constants/swaps';
import getBuyEthUrl from './buy-eth-url';
const WYRE_ACCOUNT_ID = 'AC-7AG3W4XH4N2';
const ETH_ADDRESS = '0x0dcd5d886577d5581b0c524242ef2ee70be3e7bc';
const MAINNET = {
chainId: MAINNET_CHAIN_ID,
amount: 5,
address: ETH_ADDRESS,
};
const ROPSTEN = {
chainId: ROPSTEN_CHAIN_ID,
};
const RINKEBY = {
chainId: RINKEBY_CHAIN_ID,
};
const KOVAN = {
chainId: KOVAN_CHAIN_ID,
};
describe('buy-eth-url', () => {
it('returns Wyre url with an ETH address for Ethereum mainnet', async () => {
nock(SWAPS_API_V2_BASE_URL)
.get(
`/networks/1/fiatOnRampUrl?serviceName=wyre&destinationAddress=${ETH_ADDRESS}`,
)
.reply(200, {
url: `https://pay.sendwyre.com/purchase?accountId=${WYRE_ACCOUNT_ID}&utm_campaign=${WYRE_ACCOUNT_ID}&destCurrency=ETH&utm_medium=widget&paymentMethod=debit-card&reservation=MLZVUF8FMXZUMARJC23B&dest=ethereum%3A${ETH_ADDRESS}&utm_source=checkout`,
});
const wyreUrl = await getBuyEthUrl(MAINNET);
expect(wyreUrl).toStrictEqual(
`https://pay.sendwyre.com/purchase?accountId=${WYRE_ACCOUNT_ID}&utm_campaign=${WYRE_ACCOUNT_ID}&destCurrency=ETH&utm_medium=widget&paymentMethod=debit-card&reservation=MLZVUF8FMXZUMARJC23B&dest=ethereum%3A${ETH_ADDRESS}&utm_source=checkout`,
);
nock.cleanAll();
});
it('returns a fallback Wyre url if /orders/reserve API call fails', async () => {
const wyreUrl = await getBuyEthUrl(MAINNET);
expect(wyreUrl).toStrictEqual(
`https://pay.sendwyre.com/purchase?dest=ethereum:${ETH_ADDRESS}&destCurrency=ETH&accountId=${WYRE_ACCOUNT_ID}&paymentMethod=debit-card`,
);
});
it('returns Transak url with an ETH address for Ethereum mainnet', async () => {
const transakUrl = await getBuyEthUrl({ ...MAINNET, service: 'transak' });
expect(transakUrl).toStrictEqual(
`https://global.transak.com/?apiKey=${TRANSAK_API_KEY}&hostURL=https%3A%2F%2Fmetamask.io&defaultCryptoCurrency=ETH&walletAddress=${ETH_ADDRESS}`,
);
});
it('returns metamask ropsten faucet for network 3', async () => {
const ropstenUrl = await getBuyEthUrl(ROPSTEN);
expect(ropstenUrl).toStrictEqual('https://faucet.metamask.io/');
});
it('returns rinkeby dapp for network 4', async () => {
const rinkebyUrl = await getBuyEthUrl(RINKEBY);
expect(rinkebyUrl).toStrictEqual('https://www.rinkeby.io/');
});
it('returns kovan github test faucet for network 42', async () => {
const kovanUrl = await getBuyEthUrl(KOVAN);
expect(kovanUrl).toStrictEqual('https://github.com/kovan-testnet/faucet');
});
});

View File

@ -8,6 +8,7 @@ import {
RINKEBY_CHAIN_ID,
ROPSTEN_CHAIN_ID,
MAINNET_NETWORK_ID,
BUYABLE_CHAINS_MAP,
} from '../../../shared/constants/network';
import { SECOND } from '../../../shared/constants/time';
import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout';
@ -47,16 +48,22 @@ const createWyrePurchaseUrl = async (address) => {
* Create a Transak Checkout URL.
* API docs here: https://www.notion.so/Query-Parameters-9ec523df3b874ec58cef4fa3a906f238
*
* @param {string} address - Ethereum destination address
* @param {string} walletAddress - Ethereum destination address
* @param {string} chainId - Current chain ID
* @returns String
*/
const createTransakUrl = (address) => {
const createTransakUrl = (walletAddress, chainId) => {
const { transakCurrencies, network } = BUYABLE_CHAINS_MAP[chainId];
const queryParams = new URLSearchParams({
apiKey: TRANSAK_API_KEY,
hostURL: 'https://metamask.io',
defaultCryptoCurrency: 'ETH',
walletAddress: address,
cryptoCurrencyList: transakCurrencies.join(','),
defaultCryptoCurrency: transakCurrencies[0],
networks: network,
walletAddress,
});
return `https://global.transak.com/?${queryParams}`;
};
@ -70,7 +77,7 @@ const createTransakUrl = (address) => {
* @returns {string|undefined} The url at which the user can access ETH, while in the given chain. If the passed
* chainId does not match any of the specified cases, or if no chainId is given, returns undefined.
*/
export default async function getBuyEthUrl({ chainId, address, service }) {
export default async function getBuyUrl({ chainId, address, service }) {
// default service by network if not specified
if (!service) {
// eslint-disable-next-line no-param-reassign
@ -81,7 +88,7 @@ export default async function getBuyEthUrl({ chainId, address, service }) {
case 'wyre':
return await createWyrePurchaseUrl(address);
case 'transak':
return createTransakUrl(address);
return createTransakUrl(address, chainId);
case 'metamask-faucet':
return 'https://faucet.metamask.io/';
case 'rinkeby-faucet':

View File

@ -0,0 +1,117 @@
import nock from 'nock';
import {
KOVAN_CHAIN_ID,
MAINNET_CHAIN_ID,
RINKEBY_CHAIN_ID,
ROPSTEN_CHAIN_ID,
BSC_CHAIN_ID,
POLYGON_CHAIN_ID,
ETH_SYMBOL,
BUYABLE_CHAINS_MAP,
} from '../../../shared/constants/network';
import { TRANSAK_API_KEY } from '../constants/on-ramp';
import { SWAPS_API_V2_BASE_URL } from '../../../shared/constants/swaps';
import getBuyUrl from './buy-url';
const WYRE_ACCOUNT_ID = 'AC-7AG3W4XH4N2';
const ETH_ADDRESS = '0x0dcd5d886577d5581b0c524242ef2ee70be3e7bc';
const MAINNET = {
chainId: MAINNET_CHAIN_ID,
amount: 5,
address: ETH_ADDRESS,
};
const ROPSTEN = {
chainId: ROPSTEN_CHAIN_ID,
};
const RINKEBY = {
chainId: RINKEBY_CHAIN_ID,
};
const KOVAN = {
chainId: KOVAN_CHAIN_ID,
};
const BSC = {
chainId: BSC_CHAIN_ID,
amount: 5,
address: ETH_ADDRESS,
};
const POLYGON = {
chainId: POLYGON_CHAIN_ID,
amount: 5,
address: ETH_ADDRESS,
};
describe('buy-url', () => {
it('returns Wyre url with an ETH address for Ethereum mainnet', async () => {
nock(SWAPS_API_V2_BASE_URL)
.get(
`/networks/1/fiatOnRampUrl?serviceName=wyre&destinationAddress=${ETH_ADDRESS}`,
)
.reply(200, {
url: `https://pay.sendwyre.com/purchase?accountId=${WYRE_ACCOUNT_ID}&utm_campaign=${WYRE_ACCOUNT_ID}&destCurrency=${ETH_SYMBOL}&utm_medium=widget&paymentMethod=debit-card&reservation=MLZVUF8FMXZUMARJC23B&dest=ethereum%3A${ETH_ADDRESS}&utm_source=checkout`,
});
const wyreUrl = await getBuyUrl(MAINNET);
expect(wyreUrl).toStrictEqual(
`https://pay.sendwyre.com/purchase?accountId=${WYRE_ACCOUNT_ID}&utm_campaign=${WYRE_ACCOUNT_ID}&destCurrency=${ETH_SYMBOL}&utm_medium=widget&paymentMethod=debit-card&reservation=MLZVUF8FMXZUMARJC23B&dest=ethereum%3A${ETH_ADDRESS}&utm_source=checkout`,
);
nock.cleanAll();
});
it('returns a fallback Wyre url if /orders/reserve API call fails', async () => {
const wyreUrl = await getBuyUrl(MAINNET);
expect(wyreUrl).toStrictEqual(
`https://pay.sendwyre.com/purchase?dest=ethereum:${ETH_ADDRESS}&destCurrency=${ETH_SYMBOL}&accountId=${WYRE_ACCOUNT_ID}&paymentMethod=debit-card`,
);
});
it('returns Transak url with an ETH address for Ethereum mainnet', async () => {
const transakUrl = await getBuyUrl({ ...MAINNET, service: 'transak' });
const buyableChain = BUYABLE_CHAINS_MAP[MAINNET.chainId];
const buyableCurrencies = encodeURIComponent(
buyableChain.transakCurrencies.join(','),
);
expect(transakUrl).toStrictEqual(
`https://global.transak.com/?apiKey=${TRANSAK_API_KEY}&hostURL=https%3A%2F%2Fmetamask.io&cryptoCurrencyList=${buyableCurrencies}&defaultCryptoCurrency=${buyableChain.transakCurrencies[0]}&networks=${buyableChain.network}&walletAddress=${ETH_ADDRESS}`,
);
});
it('returns Transak url with an BNB address for Binance Smart Chain', async () => {
const transakUrl = await getBuyUrl({ ...BSC, service: 'transak' });
const buyableChain = BUYABLE_CHAINS_MAP[BSC.chainId];
const buyableCurrencies = encodeURIComponent(
buyableChain.transakCurrencies.join(','),
);
expect(transakUrl).toStrictEqual(
`https://global.transak.com/?apiKey=${TRANSAK_API_KEY}&hostURL=https%3A%2F%2Fmetamask.io&cryptoCurrencyList=${buyableCurrencies}&defaultCryptoCurrency=${buyableChain.transakCurrencies[0]}&networks=${buyableChain.network}&walletAddress=${ETH_ADDRESS}`,
);
});
it('returns Transak url with an MATIC address for Polygon', async () => {
const transakUrl = await getBuyUrl({ ...POLYGON, service: 'transak' });
const buyableChain = BUYABLE_CHAINS_MAP[POLYGON.chainId];
const buyableCurrencies = encodeURIComponent(
buyableChain.transakCurrencies.join(','),
);
expect(transakUrl).toStrictEqual(
`https://global.transak.com/?apiKey=${TRANSAK_API_KEY}&hostURL=https%3A%2F%2Fmetamask.io&cryptoCurrencyList=${buyableCurrencies}&defaultCryptoCurrency=${buyableChain.transakCurrencies[0]}&networks=${buyableChain.network}&walletAddress=${ETH_ADDRESS}`,
);
});
it('returns metamask ropsten faucet for network 3', async () => {
const ropstenUrl = await getBuyUrl(ROPSTEN);
expect(ropstenUrl).toStrictEqual('https://faucet.metamask.io/');
});
it('returns rinkeby dapp for network 4', async () => {
const rinkebyUrl = await getBuyUrl(RINKEBY);
expect(rinkebyUrl).toStrictEqual('https://www.rinkeby.io/');
});
it('returns kovan github test faucet for network 42', async () => {
const kovanUrl = await getBuyUrl(KOVAN);
expect(kovanUrl).toStrictEqual('https://github.com/kovan-testnet/faucet');
});
});

View File

@ -23,6 +23,9 @@ export const BSC_CHAIN_ID = '0x38';
export const OPTIMISM_CHAIN_ID = '0xa';
export const OPTIMISM_TESTNET_CHAIN_ID = '0x45';
export const POLYGON_CHAIN_ID = '0x89';
export const AVALANCHE_CHAIN_ID = '0xa86a';
export const FANTOM_CHAIN_ID = '0xfa';
export const CELO_CHAIN_ID = '0xa4ec';
/**
* The largest possible chain ID we can handle.
@ -53,6 +56,9 @@ export const WETH_SYMBOL = 'WETH';
export const TEST_ETH_SYMBOL = 'TESTETH';
export const BNB_SYMBOL = 'BNB';
export const MATIC_SYMBOL = 'MATIC';
export const AVALANCHE_SYMBOL = 'AVAX';
export const FANTOM_SYMBOL = 'FTM';
export const CELO_SYMBOL = 'CELO';
export const ETH_TOKEN_IMAGE_URL = './images/eth_logo.svg';
export const TEST_ETH_TOKEN_IMAGE_URL = './images/black-eth-logo.svg';
@ -173,3 +179,55 @@ export const UNSUPPORTED_RPC_METHODS = new Set([
]);
export const IPFS_DEFAULT_GATEWAY_URL = 'dweb.link';
// The first item in transakCurrencies must be the
// default crypto currency for the network
const BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME = 'ethereum';
export const BUYABLE_CHAINS_MAP = {
[MAINNET_CHAIN_ID]: {
nativeCurrency: ETH_SYMBOL,
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
transakCurrencies: [ETH_SYMBOL, 'USDT', 'USDC', 'DAI'],
},
[ROPSTEN_CHAIN_ID]: {
nativeCurrency: ETH_SYMBOL,
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
},
[RINKEBY_CHAIN_ID]: {
nativeCurrency: ETH_SYMBOL,
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
},
[GOERLI_CHAIN_ID]: {
nativeCurrency: ETH_SYMBOL,
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
},
[KOVAN_CHAIN_ID]: {
nativeCurrency: ETH_SYMBOL,
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
},
[BSC_CHAIN_ID]: {
nativeCurrency: BNB_SYMBOL,
network: 'bsc',
transakCurrencies: [BNB_SYMBOL, 'BUSD'],
},
[POLYGON_CHAIN_ID]: {
nativeCurrency: MATIC_SYMBOL,
network: 'polygon',
transakCurrencies: [MATIC_SYMBOL, 'USDT', 'USDC', 'DAI'],
},
[AVALANCHE_CHAIN_ID]: {
nativeCurrency: AVALANCHE_SYMBOL,
network: 'avaxcchain',
transakCurrencies: [AVALANCHE_SYMBOL],
},
[FANTOM_CHAIN_ID]: {
nativeCurrency: FANTOM_SYMBOL,
network: 'fantom',
transakCurrencies: [FANTOM_SYMBOL],
},
[CELO_CHAIN_ID]: {
nativeCurrency: CELO_SYMBOL,
network: 'celo',
transakCurrencies: [CELO_SYMBOL],
},
};

View File

@ -1,6 +1,9 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { NETWORK_TO_NAME_MAP } from '../../../../../shared/constants/network';
import {
NETWORK_TO_NAME_MAP,
BUYABLE_CHAINS_MAP,
} from '../../../../../shared/constants/network';
import Button from '../../../ui/button';
export default class DepositEtherModal extends Component {
@ -13,6 +16,7 @@ export default class DepositEtherModal extends Component {
chainId: PropTypes.string.isRequired,
isTestnet: PropTypes.bool.isRequired,
isMainnet: PropTypes.bool.isRequired,
isBuyableTransakChain: PropTypes.bool.isRequired,
toWyre: PropTypes.func.isRequired,
toTransak: PropTypes.func.isRequired,
address: PropTypes.string.isRequired,
@ -93,17 +97,20 @@ export default class DepositEtherModal extends Component {
toFaucet,
isTestnet,
isMainnet,
isBuyableTransakChain,
} = this.props;
const { t } = this.context;
const networkName = NETWORK_TO_NAME_MAP[chainId];
const symbol = BUYABLE_CHAINS_MAP[chainId].nativeCurrency;
return (
<div className="page-container page-container--full-width page-container--full-height">
<div className="page-container__header">
<div className="page-container__title">
{this.context.t('depositEther')}
{t('depositCrypto', [symbol])}
</div>
<div className="page-container__subtitle">
{this.context.t('needEtherInWallet')}
{t('needCryptoInWallet', [symbol])}
</div>
<div
className="page-container__header-close"
@ -125,9 +132,9 @@ export default class DepositEtherModal extends Component {
}}
/>
),
title: this.context.t('buyWithWyre'),
text: this.context.t('buyWithWyreDescription'),
buttonLabel: this.context.t('continueToWyre'),
title: t('buyWithWyre'),
text: t('buyWithWyreDescription'),
buttonLabel: t('continueToWyre'),
onButtonClick: () => {
this.context.metricsEvent({
eventOpts: {
@ -150,9 +157,9 @@ export default class DepositEtherModal extends Component {
}}
/>
),
title: this.context.t('buyWithTransak'),
text: this.context.t('buyWithTransakDescription'),
buttonLabel: this.context.t('continueToTransak'),
title: t('buyCryptoWithTransak', [symbol]),
text: t('buyCryptoWithTransakDescription', [symbol]),
buttonLabel: t('continueToTransak'),
onButtonClick: () => {
this.context.metricsEvent({
eventOpts: {
@ -161,9 +168,9 @@ export default class DepositEtherModal extends Component {
name: 'Click buy Ether via Transak',
},
});
toTransak(address);
toTransak(address, chainId);
},
hide: !isMainnet,
hide: !isBuyableTransakChain,
})}
{this.renderRow({
logo: (
@ -177,17 +184,17 @@ export default class DepositEtherModal extends Component {
}}
/>
),
title: this.context.t('directDepositEther'),
text: this.context.t('directDepositEtherExplainer'),
buttonLabel: this.context.t('viewAccount'),
title: t('directDepositEther'),
text: t('directDepositEtherExplainer'),
buttonLabel: t('viewAccount'),
onButtonClick: () => this.goToAccountDetailsModal(),
})}
{networkName &&
this.renderRow({
logo: <i className="fa fa-tint fa-2x" />,
title: this.context.t('testFaucet'),
text: this.context.t('getEtherFromFaucet', [networkName]),
buttonLabel: this.context.t('getEther'),
title: t('testFaucet'),
text: t('getEtherFromFaucet', [networkName]),
buttonLabel: t('getEther'),
onButtonClick: () => toFaucet(chainId),
hide: !isTestnet,
})}

View File

@ -10,6 +10,7 @@ import {
getIsMainnet,
getCurrentChainId,
getSelectedAddress,
getIsBuyableTransakChain,
} from '../../../../selectors/selectors';
import DepositEtherModal from './deposit-ether-modal.component';
@ -19,6 +20,7 @@ function mapStateToProps(state) {
isTestnet: getIsTestnet(state),
isMainnet: getIsMainnet(state),
address: getSelectedAddress(state),
isBuyableTransakChain: getIsBuyableTransakChain(state),
};
}
@ -27,8 +29,8 @@ function mapDispatchToProps(dispatch) {
toWyre: (address) => {
dispatch(buyEth({ service: 'wyre', address }));
},
toTransak: (address) => {
dispatch(buyEth({ service: 'transak', address }));
toTransak: (address, chainId) => {
dispatch(buyEth({ service: 'transak', address, chainId }));
},
hideModal: () => {
dispatch(hideModal());

View File

@ -22,11 +22,10 @@ import {
isBalanceCached,
getSelectedAccount,
getShouldShowFiat,
getIsMainnet,
getIsTestnet,
getCurrentKeyring,
getSwapsDefaultToken,
getIsSwapsChain,
getIsBuyableChain,
getNativeCurrencyImage,
} from '../../../selectors/selectors';
import SwapIcon from '../../ui/icon/swap-icon.component';
@ -61,9 +60,8 @@ const EthOverview = ({ className }) => {
const showFiat = useSelector(getShouldShowFiat);
const selectedAccount = useSelector(getSelectedAccount);
const { balance } = selectedAccount;
const isMainnetChain = useSelector(getIsMainnet);
const isTestnetChain = useSelector(getIsTestnet);
const isSwapsChain = useSelector(getIsSwapsChain);
const isBuyableChain = useSelector(getIsBuyableChain);
const primaryTokenImage = useSelector(getNativeCurrencyImage);
const enteredSwapsEvent = useNewMetricEvent({
@ -118,7 +116,7 @@ const EthOverview = ({ className }) => {
<IconButton
className="eth-overview__button"
Icon={BuyIcon}
disabled={!(isMainnetChain || isTestnetChain)}
disabled={!isBuyableChain}
label={t('buy')}
onClick={() => {
depositEvent();

View File

@ -7,6 +7,7 @@ import {
NATIVE_CURRENCY_TOKEN_IMAGE_MAP,
OPTIMISM_CHAIN_ID,
OPTIMISM_TESTNET_CHAIN_ID,
BUYABLE_CHAINS_MAP,
} from '../../shared/constants/network';
import {
KEYRING_TYPES,
@ -626,6 +627,16 @@ export function getIsSwapsChain(state) {
return ALLOWED_SWAPS_CHAIN_IDS[chainId];
}
export function getIsBuyableChain(state) {
const chainId = getCurrentChainId(state);
return Object.keys(BUYABLE_CHAINS_MAP).includes(chainId);
}
export function getIsBuyableTransakChain(state) {
const chainId = getCurrentChainId(state);
return Boolean(BUYABLE_CHAINS_MAP?.[chainId]?.transakCurrencies);
}
export function getNativeCurrencyImage(state) {
const nativeCurrency = getNativeCurrency(state).toUpperCase();
return NATIVE_CURRENCY_TOKEN_IMAGE_MAP[nativeCurrency];

View File

@ -2,7 +2,7 @@ import pify from 'pify';
import log from 'loglevel';
import { captureException } from '@sentry/browser';
import { capitalize, isEqual } from 'lodash';
import getBuyEthUrl from '../../app/scripts/lib/buy-eth-url';
import getBuyUrl from '../../app/scripts/lib/buy-url';
import {
fetchLocale,
loadRelativeTimeFormatLocaleData,
@ -2002,7 +2002,7 @@ export function showSendTokenPage() {
export function buyEth(opts) {
return async (dispatch) => {
const url = await getBuyEthUrl(opts);
const url = await getBuyUrl(opts);
global.platform.openTab({ url });
dispatch({
type: actionConstants.BUY_ETH,