mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Delete shapeshift functionality; retain state and display (#8118)
* delete shapeshift functionality; retain state and display
This commit is contained in:
parent
cf8875c57b
commit
5d1f3c1436
@ -847,9 +847,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "የግል አውታረ መረብ"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR ኮድ ያሳዩ"
|
||||
},
|
||||
"queue": {
|
||||
"message": "ወረፋ"
|
||||
},
|
||||
|
@ -843,9 +843,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "شبكة خاصة"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "عرض رمز الاستجابة السريعة (QR)"
|
||||
},
|
||||
"queue": {
|
||||
"message": "اللائحة"
|
||||
},
|
||||
|
@ -846,9 +846,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Частна мрежа"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Показване на QR кода"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Опашка"
|
||||
},
|
||||
|
@ -850,9 +850,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "ব্যক্তিগত নেটওয়ার্ক"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR কোড দেখান"
|
||||
},
|
||||
"queue": {
|
||||
"message": "অপেক্ষমাণ"
|
||||
},
|
||||
|
@ -831,9 +831,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Xarxa privada"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostra el codi QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Cua"
|
||||
},
|
||||
|
@ -350,9 +350,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Soukromá síť"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Ukázat QR kód"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Tento token můžete v budoucnu přidat zpět s „Přidat token“ v nastavení účtu."
|
||||
},
|
||||
|
@ -828,9 +828,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privat netværk"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Vis QR Kode"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Kø"
|
||||
},
|
||||
|
@ -816,9 +816,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privates Netzwerk"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR Code anzeigen"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Warteschlange"
|
||||
},
|
||||
|
@ -847,9 +847,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Ιδιωτικό Δίκτυο"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Εμφάνιση κωδικού QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Ουρά"
|
||||
},
|
||||
|
@ -1041,9 +1041,6 @@
|
||||
"proposedApprovalLimit": {
|
||||
"message": "Proposed Approval Limit"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Show QR Code"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Queue"
|
||||
},
|
||||
|
@ -678,9 +678,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Red privada"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostrar codigo QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Cola"
|
||||
},
|
||||
|
@ -835,9 +835,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Red privada"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostrar el código QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Cola"
|
||||
},
|
||||
|
@ -840,9 +840,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privaatvõrk"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Kuva QR-kood"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Järjekord"
|
||||
},
|
||||
|
@ -850,9 +850,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "شبکه شخصی"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "نمایش کد QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "صف"
|
||||
},
|
||||
|
@ -847,9 +847,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Yksityinen verkko"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Näytä QR-koodi"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Jono"
|
||||
},
|
||||
|
@ -774,9 +774,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Pribadong Network"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Ipakita ang QR Code"
|
||||
},
|
||||
"queue": {
|
||||
"message": "I-queue"
|
||||
},
|
||||
|
@ -829,9 +829,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Réseau privé"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Afficher le QR Code"
|
||||
},
|
||||
"queue": {
|
||||
"message": "File d'attente"
|
||||
},
|
||||
|
@ -847,9 +847,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "רשת פרטית"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "הצג קוד QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "תור"
|
||||
},
|
||||
|
@ -847,9 +847,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "निजी नेटवर्क"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR Code दिखाएं "
|
||||
},
|
||||
"queue": {
|
||||
"message": "सूची"
|
||||
},
|
||||
|
@ -327,9 +327,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "निजी नेटवर्क"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR कोड दिखाएं"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "आप अपने खाता विकल्प मेनू में .टोकन जोड़ें. पर जाकर भविष्य में इस टोकन को वापस जोड़ सकते हैं।"
|
||||
},
|
||||
|
@ -843,9 +843,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privatna mreža"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Prikaži QR kȏd"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Red čekanja"
|
||||
},
|
||||
|
@ -513,9 +513,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rezo Prive"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Montre QR Kòd"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Ou ka ajoute token sa aprè sa ankò ou prale nan \"Ajoute token\" nan opsyon meni kont ou an."
|
||||
},
|
||||
|
@ -843,9 +843,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Magánhálózat"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR kód megmutatása"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Nyomtatólista"
|
||||
},
|
||||
|
@ -828,9 +828,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Jaringan Privat"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Tampilkan Kode QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Antrean"
|
||||
},
|
||||
|
@ -813,9 +813,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rete Privata"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostra Codice QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Coda"
|
||||
},
|
||||
|
@ -393,9 +393,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "プライベート・ネットワーク"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QRコードを表示"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "アカウントのオプションメニューから「トークンを追加」すれば、将来このトークンを追加し直すことができます。"
|
||||
},
|
||||
|
@ -850,9 +850,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "ಖಾಸಗಿ ನೆಟ್ವರ್ಕ್"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR ಕೋಡ್ ತೋರಿಸಿ"
|
||||
},
|
||||
"queue": {
|
||||
"message": "ಸರತಿ"
|
||||
},
|
||||
|
@ -841,9 +841,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "프라이빗 네트워크"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR 코드 보기"
|
||||
},
|
||||
"queue": {
|
||||
"message": "큐"
|
||||
},
|
||||
|
@ -850,9 +850,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privatus tinklas"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Rodyti QR kodą"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Eilė"
|
||||
},
|
||||
|
@ -846,9 +846,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privātais tīkls"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Rādīt QR kodu"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Rinda"
|
||||
},
|
||||
|
@ -821,9 +821,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rangkaian Persendirian"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Tunjuk Kod QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Baris Gilir"
|
||||
},
|
||||
|
@ -314,9 +314,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Prive netwerk"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR-code weergeven"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "U kunt dit token in de toekomst weer toevoegen door naar \"Token toevoegen\" te gaan in het menu met accountopties."
|
||||
},
|
||||
|
@ -840,9 +840,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privat nettverk "
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Vis QR-kode"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Kø"
|
||||
},
|
||||
|
@ -225,9 +225,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Pribadong Network"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Ipakita ang QR Code"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Upang muling idagdag ang token na ito, pumunta sa “Magdagdag ng Token” sa options menu ng iyong account."
|
||||
},
|
||||
|
@ -841,9 +841,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Sieć prywatna"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Pokaż kod QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Kolejka"
|
||||
},
|
||||
|
@ -324,9 +324,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rede Privada"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostrar Código QR"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Pode adicionar este token de novo clicando na opção “Adicionar token” no menu de opções da sua conta."
|
||||
},
|
||||
|
@ -835,9 +835,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rede Particular"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostrar QR Code"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Fila"
|
||||
},
|
||||
|
@ -117,9 +117,6 @@
|
||||
"privacyMsg": {
|
||||
"message": "Política de Privacidade"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Mostre o código QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Fila"
|
||||
},
|
||||
|
@ -837,9 +837,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Rețea privată"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Afișare cod QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Coadă"
|
||||
},
|
||||
|
@ -360,9 +360,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Частная сеть"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Показать QR-код"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Вы можете в будущем добавить обратно этот токен, выбрав пункт меню “Добавить токен”."
|
||||
},
|
||||
|
@ -816,9 +816,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Soukromá síť"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Ukázat QR kód"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Poradie"
|
||||
},
|
||||
|
@ -835,9 +835,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Zasebno omrežje"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Prikaži QR kodo"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Čakalna vrsta"
|
||||
},
|
||||
|
@ -841,9 +841,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privatna mreža"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Prikaži QR šifru"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Ред"
|
||||
},
|
||||
|
@ -834,9 +834,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Privat nätverk"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Visa QR-kod"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Utskriftskö"
|
||||
},
|
||||
|
@ -828,9 +828,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Mtandao Binafsi"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Onyesha Msimbo wa QR"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Foleni"
|
||||
},
|
||||
|
@ -354,9 +354,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "தனியார் நெட்வொர்க்"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR குறியீட்டைக் காட்டு"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "உங்கள் கணக்கு விருப்பங்கள் மெனுவில் \"டோக்கனைச் சேர்\" என்பதன் மூலம் நீங்கள் எதிர்காலத்தில் இந்த டோக்கனை மீண்டும் சேர்க்கலாம்."
|
||||
},
|
||||
|
@ -420,9 +420,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "เครือข่ายส่วนตัว"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "แสดง QR Code"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "คุณสามารถเพิ่มโทเค็นนี้ในอนาคตได้โดยไปที่ “เพิ่มโทเค็น” ในเมนูตัวเลือกบัญชีของคุณ"
|
||||
},
|
||||
|
@ -366,9 +366,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Özel Ağ"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "QR Kodunu göster"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Gelecekte Bu jetonu hesap seçenekleri menüsünde “Jeton ekle”'ye giderek geri ekleyebilirsiniz."
|
||||
},
|
||||
|
@ -850,9 +850,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Приватна мережа"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Показати QR код"
|
||||
},
|
||||
"queue": {
|
||||
"message": "Черга"
|
||||
},
|
||||
|
@ -261,9 +261,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "Mạng lưới riêng"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "Hiển thị mã QR"
|
||||
},
|
||||
"readdToken": {
|
||||
"message": "Bạn có thể thêm trở lại mã token này bằng cách nhấn \"Thêm mã token\" trong menu tùy chọn trong tài khoản của bạn."
|
||||
},
|
||||
|
@ -832,9 +832,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "私有网络"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "显示二维码"
|
||||
},
|
||||
"queue": {
|
||||
"message": "队列"
|
||||
},
|
||||
|
@ -838,9 +838,6 @@
|
||||
"privateNetwork": {
|
||||
"message": "私有網路"
|
||||
},
|
||||
"qrCode": {
|
||||
"message": "顯示 QR Code"
|
||||
},
|
||||
"queue": {
|
||||
"message": "佇列"
|
||||
},
|
||||
|
@ -66,7 +66,6 @@ import contractMap from 'eth-contract-metadata'
|
||||
import {
|
||||
AddressBookController,
|
||||
CurrencyRateController,
|
||||
ShapeShiftController,
|
||||
PhishingController,
|
||||
} from 'gaba'
|
||||
|
||||
@ -276,8 +275,6 @@ export default class MetamaskController extends EventEmitter {
|
||||
this.setCurrentCurrency(this.currencyRateController.state.currentCurrency, function () {})
|
||||
})
|
||||
|
||||
this.shapeshiftController = new ShapeShiftController(undefined, initState.ShapeShiftController)
|
||||
|
||||
this.networkController.lookupNetwork()
|
||||
this.messageManager = new MessageManager()
|
||||
this.personalMessageManager = new PersonalMessageManager()
|
||||
@ -297,7 +294,6 @@ export default class MetamaskController extends EventEmitter {
|
||||
PreferencesController: this.preferencesController.store,
|
||||
AddressBookController: this.addressBookController,
|
||||
CurrencyController: this.currencyRateController,
|
||||
ShapeShiftController: this.shapeshiftController,
|
||||
NetworkController: this.networkController.store,
|
||||
InfuraController: this.infuraController.store,
|
||||
CachedBalancesController: this.cachedBalancesController.store,
|
||||
@ -326,7 +322,6 @@ export default class MetamaskController extends EventEmitter {
|
||||
RecentBlocksController: this.recentBlocksController.store,
|
||||
AddressBookController: this.addressBookController,
|
||||
CurrencyController: this.currencyRateController,
|
||||
ShapeshiftController: this.shapeshiftController,
|
||||
InfuraController: this.infuraController.store,
|
||||
OnboardingController: this.onboardingController.store,
|
||||
IncomingTransactionsController: this.incomingTransactionsController.store,
|
||||
|
@ -1,345 +0,0 @@
|
||||
{
|
||||
"metamask": {
|
||||
"isInitialized": true,
|
||||
"isUnlocked": true,
|
||||
"currentDomain": "example.com",
|
||||
"rpcTarget": "https://rawtestrpc.metamask.io/",
|
||||
"identities": {
|
||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": {
|
||||
"name": "Wallet 1",
|
||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"mayBeFauceting": false
|
||||
},
|
||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": {
|
||||
"name": "Wallet 2",
|
||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb",
|
||||
"mayBeFauceting": false
|
||||
},
|
||||
"0x2f8d4a878cfa04a6e60d46362f5644deab66572d": {
|
||||
"name": "Wallet 3",
|
||||
"address": "0x2f8d4a878cfa04a6e60d46362f5644deab66572d",
|
||||
"mayBeFauceting": false
|
||||
}
|
||||
},
|
||||
"unconfTxs": {},
|
||||
"currentCurrency": "USD",
|
||||
"conversionRate": 11.21274318,
|
||||
"conversionDate": 1472159644,
|
||||
"accounts": {
|
||||
"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825": {
|
||||
"code": "0x",
|
||||
"nonce": "0x13",
|
||||
"balance": "0x461d4a64e937d3d1",
|
||||
"address": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825"
|
||||
},
|
||||
"0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb": {
|
||||
"code": "0x",
|
||||
"nonce": "0x0",
|
||||
"balance": "0x0",
|
||||
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb"
|
||||
},
|
||||
"0x2f8d4a878cfa04a6e60d46362f5644deab66572d": {
|
||||
"code": "0x",
|
||||
"balance": "0x0",
|
||||
"nonce": "0x0",
|
||||
"address": "0x2f8d4a878cfa04a6e60d46362f5644deab66572d"
|
||||
}
|
||||
},
|
||||
"transactions": [],
|
||||
"network": "1",
|
||||
"seedWords": null,
|
||||
"unconfMsgs": {},
|
||||
"messages": [],
|
||||
"shapeShiftTxList": [],
|
||||
"provider": {
|
||||
"type": "mainnet"
|
||||
},
|
||||
"selectedAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825"
|
||||
},
|
||||
"appState": {
|
||||
"menuOpen": false,
|
||||
"currentView": {
|
||||
"name": "buyEth",
|
||||
"context": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825"
|
||||
},
|
||||
"accountDetail": {
|
||||
"subview": "transactions"
|
||||
},
|
||||
"currentDomain": "127.0.0.1:9966",
|
||||
"transForward": true,
|
||||
"isLoading": false,
|
||||
"detailView": {},
|
||||
"buyView": {
|
||||
"subview": "buyForm",
|
||||
"formView": {
|
||||
"coinbase": false,
|
||||
"shapeshift": true,
|
||||
"marketinfo": {
|
||||
"pair": "btc_eth",
|
||||
"rate": 51.14252949,
|
||||
"minerFee": 0.01,
|
||||
"limit": 2.60306578,
|
||||
"minimum": 0.00038935,
|
||||
"maxLimit": 8.67688592
|
||||
},
|
||||
"coinOptions": {
|
||||
"BTC": {
|
||||
"name": "Bitcoin",
|
||||
"symbol": "BTC",
|
||||
"image": "https://shapeshift.io/images/coins/bitcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"BCY": {
|
||||
"name": "BitCrystals",
|
||||
"symbol": "BCY",
|
||||
"image": "https://shapeshift.io/images/coins/bitcrystals.png",
|
||||
"status": "available"
|
||||
},
|
||||
"BLK": {
|
||||
"name": "Blackcoin",
|
||||
"symbol": "BLK",
|
||||
"image": "https://shapeshift.io/images/coins/blackcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"BTS": {
|
||||
"name": "Bitshares",
|
||||
"symbol": "BTS",
|
||||
"specialReturn": false,
|
||||
"specialOutgoing": true,
|
||||
"specialIncoming": true,
|
||||
"fieldName": "destTag",
|
||||
"fieldKey": "destTag",
|
||||
"image": "https://shapeshift.io/images/coins/bitshares.png",
|
||||
"status": "available"
|
||||
},
|
||||
"CLAM": {
|
||||
"name": "Clams",
|
||||
"symbol": "CLAM",
|
||||
"image": "https://shapeshift.io/images/coins/clams.png",
|
||||
"status": "available"
|
||||
},
|
||||
"DASH": {
|
||||
"name": "Dash",
|
||||
"symbol": "DASH",
|
||||
"image": "https://shapeshift.io/images/coins/dash.png",
|
||||
"status": "available"
|
||||
},
|
||||
"DGB": {
|
||||
"name": "Digibyte",
|
||||
"symbol": "DGB",
|
||||
"image": "https://shapeshift.io/images/coins/digibyte.png",
|
||||
"status": "available"
|
||||
},
|
||||
"DAO": {
|
||||
"name": "TheDao",
|
||||
"symbol": "DAO",
|
||||
"image": "https://shapeshift.io/images/coins/thedao.png",
|
||||
"status": "available"
|
||||
},
|
||||
"DGD": {
|
||||
"name": "DigixDao",
|
||||
"symbol": "DGD",
|
||||
"image": "https://shapeshift.io/images/coins/digixdao.png",
|
||||
"status": "available"
|
||||
},
|
||||
"DOGE": {
|
||||
"name": "Dogecoin",
|
||||
"symbol": "DOGE",
|
||||
"image": "https://shapeshift.io/images/coins/dogecoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"EMC": {
|
||||
"name": "Emercoin",
|
||||
"symbol": "EMC",
|
||||
"image": "https://shapeshift.io/images/coins/emercoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"ETH": {
|
||||
"name": "Ether",
|
||||
"symbol": "ETH",
|
||||
"image": "https://shapeshift.io/images/coins/ether.png",
|
||||
"status": "available"
|
||||
},
|
||||
"ETC": {
|
||||
"name": "Ether Classic",
|
||||
"symbol": "ETC",
|
||||
"image": "https://shapeshift.io/images/coins/etherclassic.png",
|
||||
"status": "available"
|
||||
},
|
||||
"FCT": {
|
||||
"name": "Factoids",
|
||||
"symbol": "FCT",
|
||||
"image": "https://shapeshift.io/images/coins/factoids.png",
|
||||
"status": "available"
|
||||
},
|
||||
"LBC": {
|
||||
"name": "LBRY Credits",
|
||||
"symbol": "LBC",
|
||||
"image": "https://shapeshift.io/images/coins/lbry.png",
|
||||
"status": "available"
|
||||
},
|
||||
"LSK": {
|
||||
"name": "Lisk",
|
||||
"symbol": "LSK",
|
||||
"image": "https://shapeshift.io/images/coins/lisk.png",
|
||||
"status": "available"
|
||||
},
|
||||
"LTC": {
|
||||
"name": "Litecoin",
|
||||
"symbol": "LTC",
|
||||
"image": "https://shapeshift.io/images/coins/litecoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"MAID": {
|
||||
"name": "Maidsafe",
|
||||
"symbol": "MAID",
|
||||
"image": "https://shapeshift.io/images/coins/maidsafe.png",
|
||||
"status": "available"
|
||||
},
|
||||
"MINT": {
|
||||
"name": "Mintcoin",
|
||||
"symbol": "MINT",
|
||||
"image": "https://shapeshift.io/images/coins/mintcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"MONA": {
|
||||
"name": "Monacoin",
|
||||
"symbol": "MONA",
|
||||
"image": "https://shapeshift.io/images/coins/monacoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"MSC": {
|
||||
"name": "Omni",
|
||||
"symbol": "MSC",
|
||||
"image": "https://shapeshift.io/images/coins/mastercoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"NBT": {
|
||||
"name": "Nubits",
|
||||
"symbol": "NBT",
|
||||
"image": "https://shapeshift.io/images/coins/nubits.png",
|
||||
"status": "available"
|
||||
},
|
||||
"NMC": {
|
||||
"name": "Namecoin",
|
||||
"symbol": "NMC",
|
||||
"image": "https://shapeshift.io/images/coins/namecoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"NVC": {
|
||||
"name": "Novacoin",
|
||||
"symbol": "NVC",
|
||||
"image": "https://shapeshift.io/images/coins/novacoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"NXT": {
|
||||
"name": "Nxt",
|
||||
"symbol": "NXT",
|
||||
"specialReturn": false,
|
||||
"specialOutgoing": true,
|
||||
"specialIncoming": true,
|
||||
"specialIncomingStatus": false,
|
||||
"fieldName": "Public Key (only for unfunded accounts!)",
|
||||
"fieldKey": "rsAddress",
|
||||
"image": "https://shapeshift.io/images/coins/nxt.png",
|
||||
"status": "available"
|
||||
},
|
||||
"PPC": {
|
||||
"name": "Peercoin",
|
||||
"symbol": "PPC",
|
||||
"image": "https://shapeshift.io/images/coins/peercoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"RDD": {
|
||||
"name": "Reddcoin",
|
||||
"symbol": "RDD",
|
||||
"image": "https://shapeshift.io/images/coins/reddcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"SDC": {
|
||||
"name": "Shadowcash",
|
||||
"symbol": "SDC",
|
||||
"image": "https://shapeshift.io/images/coins/shadowcash.png",
|
||||
"status": "available"
|
||||
},
|
||||
"SC": {
|
||||
"name": "Siacoin",
|
||||
"symbol": "SC",
|
||||
"image": "https://shapeshift.io/images/coins/siacoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"SJCX": {
|
||||
"name": "StorjX",
|
||||
"symbol": "SJCX",
|
||||
"image": "https://shapeshift.io/images/coins/storjcoinx.png",
|
||||
"status": "available"
|
||||
},
|
||||
"START": {
|
||||
"name": "Startcoin",
|
||||
"symbol": "START",
|
||||
"image": "https://shapeshift.io/images/coins/startcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"STEEM": {
|
||||
"name": "Steem",
|
||||
"symbol": "STEEM",
|
||||
"specialReturn": false,
|
||||
"specialOutgoing": true,
|
||||
"specialIncoming": true,
|
||||
"fieldName": "destTag",
|
||||
"fieldKey": "destTag",
|
||||
"image": "https://shapeshift.io/images/coins/steem.png",
|
||||
"status": "available"
|
||||
},
|
||||
"USDT": {
|
||||
"name": "Tether",
|
||||
"symbol": "USDT",
|
||||
"image": "https://shapeshift.io/images/coins/tether.png",
|
||||
"status": "available"
|
||||
},
|
||||
"VOX": {
|
||||
"name": "Voxels",
|
||||
"symbol": "VOX",
|
||||
"image": "https://shapeshift.io/images/coins/voxels.png",
|
||||
"status": "available"
|
||||
},
|
||||
"VRC": {
|
||||
"name": "Vericoin",
|
||||
"symbol": "VRC",
|
||||
"image": "https://shapeshift.io/images/coins/vericoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"VTC": {
|
||||
"name": "Vertcoin",
|
||||
"symbol": "VTC",
|
||||
"image": "https://shapeshift.io/images/coins/vertcoin.png",
|
||||
"status": "available"
|
||||
},
|
||||
"XCP": {
|
||||
"name": "Counterparty",
|
||||
"symbol": "XCP",
|
||||
"image": "https://shapeshift.io/images/coins/counterparty.png",
|
||||
"status": "available"
|
||||
},
|
||||
"XMR": {
|
||||
"name": "Monero",
|
||||
"symbol": "XMR",
|
||||
"specialReturn": false,
|
||||
"specialOutgoing": true,
|
||||
"specialIncoming": true,
|
||||
"fieldName": "Payment Id",
|
||||
"qrName": "tx_payment_id",
|
||||
"fieldKey": "paymentId",
|
||||
"image": "https://shapeshift.io/images/coins/monero.png",
|
||||
"status": "available"
|
||||
}
|
||||
}
|
||||
},
|
||||
"buyAddress": "0xfdea65c8e26263f6d9a1b5de9555d2931a33b825",
|
||||
"amount": "5.00",
|
||||
"warning": null
|
||||
},
|
||||
"isSubLoading": false
|
||||
},
|
||||
"identities": {}
|
||||
}
|
@ -1053,10 +1053,7 @@
|
||||
"provider": {
|
||||
"type": "testnet"
|
||||
},
|
||||
"shapeShiftTxList": [
|
||||
{"depositAddress":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke","depositType":"BTC","key":"shapeshift","response":{"status":"no_deposits","address":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkke"},"time":1522347459106},
|
||||
{"depositAddress":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkkq","depositType":"BTC","key":"shapeshift","response":{"status":"no_deposits","address":"34vJ3AfmNcLiziA4VFgEVcQTwxVLD1qkkq"},"time":1522345459106}
|
||||
],
|
||||
"shapeShiftTxList": [],
|
||||
"send": {},
|
||||
"currentLocale": "en",
|
||||
"preferences": {
|
||||
|
@ -43,7 +43,7 @@ async function runTxListItemsTest (assert) {
|
||||
metamaskLogo[0].click()
|
||||
|
||||
const txListItems = await queryAsync($, '.transaction-list-item')
|
||||
assert.equal(txListItems.length, 8, 'all tx list items are rendered')
|
||||
assert.equal(txListItems.length, 6, 'all tx list items are rendered')
|
||||
|
||||
const unapprovedMsg = txListItems[0]
|
||||
const unapprovedMsgDescription = await findAsync($(unapprovedMsg), '.transaction-list-item__action')
|
||||
@ -57,15 +57,7 @@ async function runTxListItemsTest (assert) {
|
||||
const confirmedTokenTx1Address = await findAsync($(confirmedTokenTx1), '.transaction-list-item__status')
|
||||
assert.equal(confirmedTokenTx1Address[0].textContent, 'Confirmed', 'confirmedTokenTx has correct status')
|
||||
|
||||
const shapeShiftTx1 = txListItems[5]
|
||||
const shapeShiftTx1Status = await findAsync($(shapeShiftTx1), '.flex-column div:eq(1)')
|
||||
assert.equal(shapeShiftTx1Status[0].textContent, 'No deposits received', 'shapeShiftTx has correct status')
|
||||
|
||||
const confirmedTokenTx2 = txListItems[6]
|
||||
const confirmedTokenTx2 = txListItems[5]
|
||||
const confirmedTokenTx2Address = await findAsync($(confirmedTokenTx2), '.transaction-list-item__status')
|
||||
assert.equal(confirmedTokenTx2Address[0].textContent, 'Confirmed', 'confirmedTokenTx has correct status')
|
||||
|
||||
const shapeShiftTx2 = txListItems[7]
|
||||
const shapeShiftTx2Address = await findAsync($(shapeShiftTx2), '.flex-column div:eq(1)')
|
||||
assert.equal(shapeShiftTx2Address[0].textContent, 'No deposits received', 'shapeShiftTx has correct status')
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import assert from 'assert'
|
||||
import sinon from 'sinon'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import nock from 'nock'
|
||||
import fetchMock from 'fetch-mock'
|
||||
import configureStore from 'redux-mock-store'
|
||||
import thunk from 'redux-thunk'
|
||||
@ -1309,30 +1308,6 @@ describe('Actions', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('#pairUpdate', function () {
|
||||
it('calls expected actions', function () {
|
||||
nock('https://shapeshift.io')
|
||||
.defaultReplyHeaders({ 'access-control-allow-origin': '*' })
|
||||
.get('/marketinfo/btc_eth')
|
||||
.reply(200, { pair: 'BTC_ETH', rate: 25.68289016, minerFee: 0.00176, limit: 0.67748474, minimum: 0.00013569, maxLimit: 0.67758573 })
|
||||
|
||||
nock('https://shapeshift.io')
|
||||
.defaultReplyHeaders({ 'access-control-allow-origin': '*' })
|
||||
.get('/coins')
|
||||
.reply(200)
|
||||
|
||||
const store = mockStore()
|
||||
// issue with dispatch action in callback not showing
|
||||
const expectedActions = [
|
||||
{ type: 'SHOW_SUB_LOADING_INDICATION' },
|
||||
{ type: 'HIDE_WARNING' },
|
||||
]
|
||||
|
||||
store.dispatch(actions.pairUpdate('btc'))
|
||||
assert.deepEqual(store.getActions(), expectedActions)
|
||||
})
|
||||
})
|
||||
|
||||
describe('#setFeatureFlag', function () {
|
||||
let setFeatureFlagSpy
|
||||
|
||||
|
@ -330,23 +330,6 @@ describe('App State', function () {
|
||||
assert.equal(state.isLoading, false)
|
||||
})
|
||||
|
||||
it('shows sub loading indicator', function () {
|
||||
const state = reduceApp(metamaskState, {
|
||||
type: actions.SHOW_SUB_LOADING_INDICATION,
|
||||
})
|
||||
|
||||
assert.equal(state.isSubLoading, true)
|
||||
})
|
||||
|
||||
it('hides sub loading indicator', function () {
|
||||
const oldState = { ...metamaskState, isSubLoading: true }
|
||||
const state = reduceApp(oldState, {
|
||||
type: actions.HIDE_SUB_LOADING_INDICATION,
|
||||
})
|
||||
|
||||
assert.equal(state.isSubLoading, false)
|
||||
})
|
||||
|
||||
it('displays warning', function () {
|
||||
const state = reduceApp(metamaskState, {
|
||||
type: actions.DISPLAY_WARNING,
|
||||
@ -378,90 +361,6 @@ describe('App State', function () {
|
||||
assert.equal(state.accountDetail.privateKey, 'private key')
|
||||
})
|
||||
|
||||
it('updates pair', function () {
|
||||
const coinOptions = {
|
||||
BTC: {
|
||||
symbol: 'BTC',
|
||||
name: 'Bitcoin',
|
||||
image: 'https://shapeshift.io/images/coins/bitcoin.png',
|
||||
imageSmall: 'https://shapeshift.io/images/coins-sm/bitcoin.png',
|
||||
status: 'available',
|
||||
minerFee: 0.00025,
|
||||
},
|
||||
}
|
||||
|
||||
const appState = {
|
||||
buyView: {
|
||||
buyAddress: '0xAddress',
|
||||
amount: '12.00',
|
||||
formView: {
|
||||
coinOptions,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const marketinfo = {
|
||||
pair: 'BTC_ETH',
|
||||
rate: 28.91191106,
|
||||
minerFee: 0.0022,
|
||||
limit: 0.76617432,
|
||||
minimum: 0.00015323,
|
||||
maxLimit: 0.76617432,
|
||||
}
|
||||
|
||||
const oldState = { ...metamaskState, ...appState }
|
||||
|
||||
const state = reduceApp(oldState, {
|
||||
type: actions.PAIR_UPDATE,
|
||||
value: {
|
||||
marketinfo,
|
||||
},
|
||||
})
|
||||
|
||||
assert.equal(state.buyView.subview, 'ShapeShift')
|
||||
assert.equal(state.buyView.formView.shapeshift, true)
|
||||
assert.deepEqual(state.buyView.formView.marketinfo, marketinfo)
|
||||
assert.deepEqual(state.buyView.formView.coinOptions, coinOptions)
|
||||
assert.equal(state.buyView.buyAddress, '0xAddress')
|
||||
assert.equal(state.buyView.amount, '12.00')
|
||||
})
|
||||
|
||||
it('shows QR', function () {
|
||||
const state = reduceApp(metamaskState, {
|
||||
type: actions.SHOW_QR,
|
||||
value: {
|
||||
message: 'message',
|
||||
data: 'data',
|
||||
},
|
||||
})
|
||||
|
||||
assert.equal(state.qrRequested, true)
|
||||
assert.equal(state.transForward, true)
|
||||
assert.equal(state.Qr.message, 'message')
|
||||
assert.equal(state.Qr.data, 'data')
|
||||
})
|
||||
|
||||
it('shows qr view', function () {
|
||||
const appState = {
|
||||
currentView: {
|
||||
context: 'accounts',
|
||||
},
|
||||
}
|
||||
|
||||
const oldState = { ...metamaskState, ...appState }
|
||||
const state = reduceApp(oldState, {
|
||||
type: actions.SHOW_QR_VIEW,
|
||||
value: {
|
||||
message: 'message',
|
||||
data: 'data',
|
||||
},
|
||||
})
|
||||
|
||||
assert.equal(state.transForward, true)
|
||||
assert.equal(state.Qr.message, 'message')
|
||||
assert.equal(state.Qr.data, 'data')
|
||||
})
|
||||
|
||||
it('set mouse user state', function () {
|
||||
const state = reduceApp(metamaskState, {
|
||||
type: actions.SET_MOUSE_USER_STATE,
|
||||
|
@ -291,19 +291,6 @@ describe('MetaMask Reducers', function () {
|
||||
assert.equal(state.selectedAddressTxList[0].txParams, 'bar')
|
||||
})
|
||||
|
||||
it('updates pair for shapeshift', function () {
|
||||
const state = reduceMetamask({}, {
|
||||
type: actions.PAIR_UPDATE,
|
||||
value: {
|
||||
marketinfo: {
|
||||
pair: 'test pair',
|
||||
foo: 'bar',
|
||||
},
|
||||
},
|
||||
})
|
||||
assert.equal(state.tokenExchangeRates['test pair'].pair, 'test pair')
|
||||
})
|
||||
|
||||
it('sets blockies', function () {
|
||||
const state = reduceMetamask({}, {
|
||||
type: actions.SET_USE_BLOCKIE,
|
||||
|
@ -13,7 +13,6 @@ describe('Account Details Modal', function () {
|
||||
hideModal: sinon.spy(),
|
||||
setAccountLabel: sinon.spy(),
|
||||
showExportPrivateKeyModal: sinon.spy(),
|
||||
showQrView: sinon.spy(),
|
||||
network: 'test',
|
||||
rpcPrefs: {},
|
||||
selectedIdentity: {
|
||||
|
@ -1,11 +1,9 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import { createExplorerLink as explorerLink } from 'etherscan-link'
|
||||
import * as actions from '../../../store/actions'
|
||||
import { formatDate, addressSummary } from '../../../helpers/utils/util'
|
||||
import CopyButton from '../../ui/copyButton'
|
||||
import EthBalance from '../../ui/eth-balance'
|
||||
import Tooltip from '../../ui/tooltip'
|
||||
|
||||
export default class ShiftListItem extends Component {
|
||||
static contextTypes = {
|
||||
@ -19,7 +17,6 @@ export default class ShiftListItem extends Component {
|
||||
|
||||
static propTypes = {
|
||||
depositType: PropTypes.string.isRequired,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
depositAddress: PropTypes.string.isRequired,
|
||||
conversionRate: PropTypes.any,
|
||||
currentCurrency: PropTypes.any,
|
||||
@ -39,23 +36,9 @@ export default class ShiftListItem extends Component {
|
||||
return (
|
||||
<div className="flex-row">
|
||||
<CopyButton value={this.props.depositAddress} />
|
||||
<Tooltip title={this.context.t('qrCode')}>
|
||||
<i
|
||||
className="fa fa-qrcode pointer pop-hover"
|
||||
onClick={() => {
|
||||
this.props.dispatch(actions.reshowQrCode(this.props.depositAddress, this.props.depositType))
|
||||
}}
|
||||
style={{
|
||||
margin: '5px',
|
||||
marginLeft: '23px',
|
||||
marginRight: '12px',
|
||||
fontSize: '20px',
|
||||
color: '#F7861C',
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)
|
||||
|
||||
case 'received':
|
||||
return <div className="flex-row" />
|
||||
|
||||
|
@ -399,26 +399,6 @@
|
||||
@media screen and (max-width: 575px) {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.shapeshift-form-wrapper {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 1 0 auto;
|
||||
|
||||
.shapeshift-form, .modal-shapeshift-form {
|
||||
border-radius: 8px;
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
padding: 17px 15px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&__caret {
|
||||
width: auto;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__logo {
|
||||
@ -453,23 +433,6 @@
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
&__shapeshift-buy {
|
||||
padding-top: 25px;
|
||||
position: relative;
|
||||
@media screen and (max-width: 575px) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
padding-bottom: 25px;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
padding-top: 20px;
|
||||
min-height: 240px;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__logo-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -534,34 +497,10 @@
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
&__deposit-button, .shapeshift-form__shapeshift-buy-btn {
|
||||
&__deposit-button {
|
||||
width: 257px;
|
||||
}
|
||||
|
||||
.shapeshift-form-wrapper {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 28px;
|
||||
flex: 1 0 auto;
|
||||
|
||||
.shapeshift-form, .modal-shapeshift-form {
|
||||
border-radius: 8px;
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
padding: 17px 15px;
|
||||
|
||||
&__caret {
|
||||
width: auto;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.shapeshift-form__shapeshift-buy-btn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.simple-dropdown {
|
||||
color: #5B5D67;
|
||||
font-size: 16px;
|
||||
|
@ -285,18 +285,6 @@ export default function reduceApp (state = {}, action) {
|
||||
isLoading: false,
|
||||
}
|
||||
|
||||
case actions.SHOW_SUB_LOADING_INDICATION:
|
||||
return {
|
||||
...appState,
|
||||
isSubLoading: true,
|
||||
}
|
||||
|
||||
case actions.HIDE_SUB_LOADING_INDICATION:
|
||||
return {
|
||||
...appState,
|
||||
isSubLoading: false,
|
||||
}
|
||||
|
||||
case actions.DISPLAY_WARNING:
|
||||
return {
|
||||
...appState,
|
||||
@ -320,45 +308,6 @@ export default function reduceApp (state = {}, action) {
|
||||
},
|
||||
}
|
||||
|
||||
case actions.PAIR_UPDATE:
|
||||
return {
|
||||
...appState,
|
||||
buyView: {
|
||||
subview: 'ShapeShift',
|
||||
formView: {
|
||||
coinbase: false,
|
||||
shapeshift: true,
|
||||
marketinfo: action.value.marketinfo,
|
||||
coinOptions: appState.buyView.formView.coinOptions,
|
||||
},
|
||||
buyAddress: appState.buyView.buyAddress,
|
||||
amount: appState.buyView.amount,
|
||||
warning: null,
|
||||
},
|
||||
}
|
||||
|
||||
case actions.SHOW_QR:
|
||||
return {
|
||||
...appState,
|
||||
qrRequested: true,
|
||||
transForward: true,
|
||||
|
||||
Qr: {
|
||||
message: action.value.message,
|
||||
data: action.value.data,
|
||||
},
|
||||
}
|
||||
|
||||
case actions.SHOW_QR_VIEW:
|
||||
return {
|
||||
...appState,
|
||||
transForward: true,
|
||||
Qr: {
|
||||
message: action.value.message,
|
||||
data: action.value.data,
|
||||
},
|
||||
}
|
||||
|
||||
case actions.SET_MOUSE_USER_STATE:
|
||||
return {
|
||||
...appState,
|
||||
|
@ -294,16 +294,6 @@ export default function reduceMetamask (state = {}, action) {
|
||||
selectedAddressTxList,
|
||||
}
|
||||
|
||||
case actions.PAIR_UPDATE:
|
||||
const { value: { marketinfo: pairMarketInfo } } = action
|
||||
return {
|
||||
...metamaskState,
|
||||
tokenExchangeRates: {
|
||||
...metamaskState.tokenExchangeRates,
|
||||
[pairMarketInfo.pair]: pairMarketInfo,
|
||||
},
|
||||
}
|
||||
|
||||
case actions.SET_PARTICIPATE_IN_METAMETRICS:
|
||||
return {
|
||||
...metamaskState,
|
||||
|
@ -104,6 +104,9 @@ describe('Transaction Selectors', function () {
|
||||
|
||||
const state = {
|
||||
metamask: {
|
||||
provider: {
|
||||
nickname: 'mainnet',
|
||||
},
|
||||
featureFlags: {
|
||||
showIncomingTransactions: false,
|
||||
},
|
||||
@ -140,6 +143,9 @@ describe('Transaction Selectors', function () {
|
||||
|
||||
const state = {
|
||||
metamask: {
|
||||
provider: {
|
||||
nickname: 'mainnet',
|
||||
},
|
||||
featureFlags: {
|
||||
showIncomingTransactions: false,
|
||||
},
|
||||
@ -203,6 +209,9 @@ describe('Transaction Selectors', function () {
|
||||
|
||||
const state = {
|
||||
metamask: {
|
||||
provider: {
|
||||
nickname: 'mainnet',
|
||||
},
|
||||
featureFlags: {
|
||||
showIncomingTransactions: false,
|
||||
},
|
||||
@ -284,6 +293,9 @@ describe('Transaction Selectors', function () {
|
||||
|
||||
const state = {
|
||||
metamask: {
|
||||
provider: {
|
||||
nickname: 'mainnet',
|
||||
},
|
||||
featureFlags: {
|
||||
showIncomingTransactions: false,
|
||||
},
|
||||
|
@ -12,10 +12,15 @@ import {
|
||||
import { hexToDecimal } from '../helpers/utils/conversions.util'
|
||||
import { selectedTokenAddressSelector } from './tokens'
|
||||
import { getFastPriceEstimateInHexWEI } from './custom-gas'
|
||||
import { getSelectedToken } from './selectors'
|
||||
import { getSelectedToken, getIsMainnet } from './selectors'
|
||||
import txHelper from '../../lib/tx-helper'
|
||||
|
||||
export const shapeShiftTxListSelector = (state) => state.metamask.shapeShiftTxList
|
||||
export const shapeShiftTxListSelector = (state) => {
|
||||
if (getIsMainnet(state)) {
|
||||
return state.metamask.shapeShiftTxList
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
export const incomingTxListSelector = (state) => {
|
||||
const { showIncomingTransactions } = state.metamask.featureFlags
|
||||
|
@ -89,12 +89,6 @@ export const actionConstants = {
|
||||
HIDE_LOADING: 'HIDE_LOADING_INDICATION',
|
||||
// buy Eth with coinbase
|
||||
BUY_ETH: 'BUY_ETH',
|
||||
PAIR_UPDATE: 'PAIR_UPDATE',
|
||||
SHOW_SUB_LOADING_INDICATION: 'SHOW_SUB_LOADING_INDICATION',
|
||||
HIDE_SUB_LOADING_INDICATION: 'HIDE_SUB_LOADING_INDICATION',
|
||||
// QR STUFF:
|
||||
SHOW_QR: 'SHOW_QR',
|
||||
SHOW_QR_VIEW: 'SHOW_QR_VIEW',
|
||||
|
||||
TOGGLE_ACCOUNT_MENU: 'TOGGLE_ACCOUNT_MENU',
|
||||
|
||||
@ -1807,18 +1801,6 @@ export function hideLoadingIndication () {
|
||||
}
|
||||
}
|
||||
|
||||
export function showSubLoadingIndication () {
|
||||
return {
|
||||
type: actionConstants.SHOW_SUB_LOADING_INDICATION,
|
||||
}
|
||||
}
|
||||
|
||||
export function hideSubLoadingIndication () {
|
||||
return {
|
||||
type: actionConstants.HIDE_SUB_LOADING_INDICATION,
|
||||
}
|
||||
}
|
||||
|
||||
export function displayWarning (text) {
|
||||
return {
|
||||
type: actionConstants.DISPLAY_WARNING,
|
||||
@ -1912,86 +1894,6 @@ export function buyEth (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
export function pairUpdate (coin) {
|
||||
return (dispatch) => {
|
||||
dispatch(showSubLoadingIndication())
|
||||
dispatch(hideWarning())
|
||||
shapeShiftRequest('marketinfo', { pair: `${coin.toLowerCase()}_eth` }, (mktResponse) => {
|
||||
dispatch(hideSubLoadingIndication())
|
||||
if (mktResponse.error) {
|
||||
return dispatch(displayWarning(mktResponse.error))
|
||||
}
|
||||
dispatch({
|
||||
type: actionConstants.PAIR_UPDATE,
|
||||
value: {
|
||||
marketinfo: mktResponse,
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function showQrView (data, message) {
|
||||
return {
|
||||
type: actionConstants.SHOW_QR_VIEW,
|
||||
value: {
|
||||
message: message,
|
||||
data: data,
|
||||
},
|
||||
}
|
||||
}
|
||||
export function reshowQrCode (data, coin) {
|
||||
return (dispatch) => {
|
||||
dispatch(showLoadingIndication())
|
||||
shapeShiftRequest('marketinfo', { pair: `${coin.toLowerCase()}_eth` }, (mktResponse) => {
|
||||
if (mktResponse.error) {
|
||||
return dispatch(displayWarning(mktResponse.error))
|
||||
}
|
||||
|
||||
const message = [
|
||||
`Deposit your ${coin} to the address below:`,
|
||||
`Deposit Limit: ${mktResponse.limit}`,
|
||||
`Deposit Minimum:${mktResponse.minimum}`,
|
||||
]
|
||||
|
||||
dispatch(hideLoadingIndication())
|
||||
return dispatch(showQrView(data, message))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function shapeShiftRequest (query, options = {}, cb) {
|
||||
let queryResponse, method
|
||||
options.method ? method = options.method : method = 'GET'
|
||||
|
||||
const requestListner = function () {
|
||||
try {
|
||||
queryResponse = JSON.parse(this.responseText)
|
||||
if (cb) {
|
||||
cb(queryResponse)
|
||||
}
|
||||
return queryResponse
|
||||
} catch (e) {
|
||||
if (cb) {
|
||||
cb({ error: e })
|
||||
}
|
||||
return e
|
||||
}
|
||||
}
|
||||
|
||||
const shapShiftReq = new XMLHttpRequest()
|
||||
shapShiftReq.addEventListener('load', requestListner)
|
||||
shapShiftReq.open(method, `https://shapeshift.io/${query}/${options.pair ? options.pair : ''}`, true)
|
||||
|
||||
if (options.method === 'POST') {
|
||||
const jsonObj = JSON.stringify(options.data)
|
||||
shapShiftReq.setRequestHeader('Content-Type', 'application/json')
|
||||
return shapShiftReq.send(jsonObj)
|
||||
} else {
|
||||
return shapShiftReq.send()
|
||||
}
|
||||
}
|
||||
|
||||
export function setFeatureFlag (feature, activated, notificationType) {
|
||||
return (dispatch) => {
|
||||
dispatch(showLoadingIndication())
|
||||
|
Loading…
Reference in New Issue
Block a user