diff options
Diffstat (limited to 'test')
30 files changed, 3489 insertions, 323 deletions
diff --git a/test/base.conf.js b/test/base.conf.js index 122392822..82b9d8eec 100644 --- a/test/base.conf.js +++ b/test/base.conf.js @@ -54,6 +54,8 @@ module.exports = function(config) { // Concurrency level // how many browser should be started simultaneous - concurrency: Infinity + concurrency: 1, + + nocache: true, } } diff --git a/test/helper.js b/test/helper.js index 1c5934a89..a3abbebf2 100644 --- a/test/helper.js +++ b/test/helper.js @@ -1,3 +1,7 @@ +import Enzyme from 'enzyme' +import Adapter from 'enzyme-adapter-react-15' + +Enzyme.configure({ adapter: new Adapter() }) // disallow promises from swallowing errors enableFailureOnUnhandledPromiseRejection() diff --git a/test/integration/lib/add-token.js b/test/integration/lib/add-token.js new file mode 100644 index 000000000..dd4251cc4 --- /dev/null +++ b/test/integration/lib/add-token.js @@ -0,0 +1,153 @@ +const reactTriggerChange = require('react-trigger-change') + +QUnit.module('Add token flow') + +QUnit.test('successful add token flow', (assert) => { + const done = assert.async() + runAddTokenFlowTest(assert) + .then(done) + .catch(err => { + assert.notOk(err, `Error was thrown: ${err.stack}`) + done() + }) +}) + +async function runAddTokenFlowTest (assert, done) { + const selectState = $('select') + selectState.val('add token') + reactTriggerChange(selectState[0]) + + await timeout(2000) + + // Check that no tokens have been added + assert.ok($('.token-list-item').length === 0, 'no tokens added') + + // Go to Add Token screen + let addTokenButton = $('button.btn-clear.wallet-view__add-token-button') + assert.ok(addTokenButton[0], 'add token button present') + addTokenButton[0].click() + + await timeout(1000) + + // Verify Add Token screen + let addTokenWrapper = $('.add-token__wrapper') + assert.ok(addTokenWrapper[0], 'add token wrapper renders') + + let addTokenTitle = $('.add-token__title') + assert.equal(addTokenTitle[0].textContent, 'Add Token', 'add token title is correct') + + // Cancel Add Token + const cancelAddTokenButton = $('button.btn-cancel.add-token__button') + assert.ok(cancelAddTokenButton[0], 'cancel add token button present') + cancelAddTokenButton.click() + + await timeout(1000) + + assert.ok($('.wallet-view')[0], 'cancelled and returned to account detail wallet view') + + // Return to Add Token Screen + addTokenButton = $('button.btn-clear.wallet-view__add-token-button') + assert.ok(addTokenButton[0], 'add token button present') + addTokenButton[0].click() + + await timeout(1000) + + // Verify Add Token Screen + addTokenWrapper = $('.add-token__wrapper') + addTokenTitle = $('.add-token__title') + assert.ok(addTokenWrapper[0], 'add token wrapper renders') + assert.equal(addTokenTitle[0].textContent, 'Add Token', 'add token title is correct') + + // Search for token + const searchInput = $('input.add-token__input') + searchInput.val('a') + reactTriggerChange(searchInput[0]) + + await timeout() + + // Click token to add + const tokenWrapper = $('div.add-token__token-wrapper') + assert.ok(tokenWrapper[0], 'token found') + const tokenImageProp = tokenWrapper.find('.add-token__token-icon').css('background-image') + const tokenImageUrl = tokenImageProp.slice(5, -2) + tokenWrapper[0].click() + + await timeout() + + // Click Next button + let nextButton = $('button.btn-clear.add-token__button') + assert.equal(nextButton[0].textContent, 'Next', 'next button rendered') + nextButton[0].click() + + await timeout() + + // Confirm Add token + assert.equal( + $('.add-token__description')[0].textContent, + 'Would you like to add these tokens?', + 'confirm add token rendered' + ) + assert.ok($('button.btn-clear.add-token__button')[0], 'confirm add token button found') + $('button.btn-clear.add-token__button')[0].click() + + await timeout(2000) + + // Verify added token image + let heroBalance = $('.hero-balance') + assert.ok(heroBalance, 'rendered hero balance') + assert.ok(tokenImageUrl.indexOf(heroBalance.find('img').attr('src')) > -1, 'token added') + + // Return to Add Token Screen + addTokenButton = $('button.btn-clear.wallet-view__add-token-button') + assert.ok(addTokenButton[0], 'add token button present') + addTokenButton[0].click() + + await timeout(1000) + + const addCustom = $('.add-token__add-custom') + assert.ok(addCustom[0], 'add custom token button present') + addCustom[0].click() + + await timeout() + + // Input token contract address + const customInput = $('input.add-token__add-custom-input') + customInput.val('0x177af043D3A1Aed7cc5f2397C70248Fc6cDC056c') + reactTriggerChange(customInput[0]) + + await timeout(1000) + + // Click Next button + nextButton = $('button.btn-clear.add-token__button') + assert.equal(nextButton[0].textContent, 'Next', 'next button rendered') + nextButton[0].click() + + await timeout(1000) + + // Verify symbol length error since contract address won't return symbol + const errorMessage = $('.add-token__add-custom-error-message') + assert.ok(errorMessage[0], 'error rendered') + $('button.btn-cancel.add-token__button')[0].click() + + await timeout(2000) + + // // Confirm Add token + // assert.equal( + // $('.add-token__description')[0].textContent, + // 'Would you like to add these tokens?', + // 'confirm add token rendered' + // ) + // assert.ok($('button.btn-clear.add-token__button')[0], 'confirm add token button found') + // $('button.btn-clear.add-token__button')[0].click() + + // // Verify added token image + // heroBalance = $('.hero-balance') + // assert.ok(heroBalance, 'rendered hero balance') + // assert.ok(heroBalance.find('.identicon')[0], 'token added') +} + +function timeout (time) { + return new Promise((resolve, reject) => { + setTimeout(resolve, time || 1500) + }) +} diff --git a/test/integration/lib/confirm-sig-requests.js b/test/integration/lib/confirm-sig-requests.js new file mode 100644 index 000000000..e49424c37 --- /dev/null +++ b/test/integration/lib/confirm-sig-requests.js @@ -0,0 +1,67 @@ +const reactTriggerChange = require('react-trigger-change') + +const PASSWORD = 'password123' + +QUnit.module('confirm sig requests') + +QUnit.test('successful confirmation of sig requests', (assert) => { + const done = assert.async() + runConfirmSigRequestsTest(assert).then(done).catch((err) => { + assert.notOk(err, `Error was thrown: ${err.stack}`) + done() + }) +}) + +async function runConfirmSigRequestsTest(assert, done) { + let selectState = $('select') + selectState.val('confirm sig requests') + reactTriggerChange(selectState[0]) + + await timeout(2000) + + let confirmSigHeadline = $('.request-signature__headline') + assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') + + let confirmSigRowValue = $('.request-signature__row-value') + assert.ok(confirmSigRowValue[0].textContent.match(/^\#\sTerms\sof\sUse/)) + + let confirmSigSignButton = $('.request-signature__footer__sign-button') + confirmSigSignButton[0].click() + + await timeout(2000) + + confirmSigHeadline = $('.request-signature__headline') + assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') + + let confirmSigMessage = $('.request-signature__notice') + assert.ok(confirmSigMessage[0].textContent.match(/^Signing\sthis\smessage/)) + + confirmSigRowValue = $('.request-signature__row-value') + assert.equal(confirmSigRowValue[0].textContent, '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0') + + confirmSigSignButton = $('.request-signature__footer__sign-button') + confirmSigSignButton[0].click() + + await timeout(2000) + + confirmSigHeadline = $('.request-signature__headline') + assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') + + confirmSigRowValue = $('.request-signature__row-value') + assert.equal(confirmSigRowValue[0].textContent, 'Hi, Alice!') + assert.equal(confirmSigRowValue[1].textContent, '1337') + + confirmSigSignButton = $('.request-signature__footer__sign-button') + confirmSigSignButton[0].click() + + await timeout(2000) + + const txView = $('.tx-view') + assert.ok(txView[0], 'Should return to the account details screen after confirming') +} + +function timeout (time) { + return new Promise((resolve, reject) => { + setTimeout(resolve, time || 1500) + }) +}
\ No newline at end of file diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index 61b38897e..764eae47c 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -1,3 +1,4 @@ +const reactTriggerChange = require('react-trigger-change') const PASSWORD = 'password123' const runMascaraFirstTimeTest = require('./mascara-first-time') @@ -16,6 +17,11 @@ async function runFirstTimeUsageTest(assert, done) { return runMascaraFirstTimeTest(assert, done) } + const selectState = $('select') + selectState.val('first time') + reactTriggerChange(selectState[0]) + + await timeout(2000) const app = $('#app-content') // recurse notices @@ -39,8 +45,8 @@ async function runFirstTimeUsageTest(assert, done) { await timeout() // Scroll through terms - const title = app.find('h1').text() - assert.equal(title, 'MetaMask', 'title screen') + const title = app.find('h1')[0] + assert.equal(title.textContent, 'MetaMask', 'title screen') // enter password const pwBox = app.find('#password-box')[0] @@ -76,9 +82,9 @@ async function runFirstTimeUsageTest(assert, done) { const menu = app.find('.menu-droppo')[0] const children = menu.children - const lock = children[children.length - 2] - assert.ok(lock, 'Lock menu item found') - lock.click() + const logout = children[2] + assert.ok(logout, 'Lock menu item found') + logout.click() await timeout(1000) diff --git a/test/integration/lib/mascara-first-time.js b/test/integration/lib/mascara-first-time.js index 5c18cd254..515c7f383 100644 --- a/test/integration/lib/mascara-first-time.js +++ b/test/integration/lib/mascara-first-time.js @@ -71,14 +71,12 @@ async function runFirstTimeUsageTest (assert, done) { app.find('.buy-ether__do-it-later').click() await timeout(1000) - const sandwich = app.find('.sandwich-expando')[0] - sandwich.click() + const menu = app.find('.account-menu__icon')[0] + menu.click() await timeout() - const menu = app.find('.menu-droppo')[0] - const children = menu.children - const lock = children[children.length - 2] + const lock = app.find('.account-menu__logout-button')[0] assert.ok(lock, 'Lock menu item found') lock.click() @@ -92,31 +90,25 @@ async function runFirstTimeUsageTest (assert, done) { await timeout(1000) - const detail2 = app.find('.account-detail-section')[0] + const detail2 = app.find('.wallet-view')[0] assert.ok(detail2, 'Account detail section loaded again.') await timeout() // open account settings dropdown - const qrButton = app.find('.fa.fa-ellipsis-h')[0] + const qrButton = app.find('.wallet-view__details-button')[0] qrButton.click() await timeout(1000) - // qr code item - const qrButton2 = app.find('.dropdown-menu-item')[1] - qrButton2.click() - - await timeout(1000) - - const qrHeader = app.find('.qr-header')[0] - const qrContainer = app.find('#qr-container')[0] + const qrHeader = app.find('.editable-label__value')[0] + const qrContainer = app.find('.qr-wrapper')[0] assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') assert.ok(qrContainer, 'QR Container found') await timeout() - const networkMenu = app.find('.network-indicator')[0] + const networkMenu = app.find('.network-component')[0] networkMenu.click() await timeout() diff --git a/test/integration/lib/send-new-ui.js b/test/integration/lib/send-new-ui.js new file mode 100644 index 000000000..3456f2367 --- /dev/null +++ b/test/integration/lib/send-new-ui.js @@ -0,0 +1,225 @@ +const reactTriggerChange = require('react-trigger-change') + +const PASSWORD = 'password123' + +QUnit.module('new ui send flow') + +QUnit.test('successful send flow', (assert) => { + const done = assert.async() + runSendFlowTest(assert).then(done).catch((err) => { + assert.notOk(err, `Error was thrown: ${err.stack}`) + done() + }) +}) + +global.ethQuery = { + sendTransaction: () => {}, +} + +async function runSendFlowTest(assert, done) { + console.log('*** start runSendFlowTest') + const selectState = $('select') + selectState.val('send new ui') + reactTriggerChange(selectState[0]) + + await timeout(2000) + + const sendScreenButton = $('button.btn-clear.hero-balance-button') + assert.ok(sendScreenButton[1], 'send screen button present') + sendScreenButton[1].click() + + await timeout(1000) + + const sendTitle = $('.page-container__title') + assert.equal(sendTitle[0].textContent, 'Send ETH', 'Send screen title is correct') + + const sendCopy = $('.page-container__subtitle') + assert.equal(sendCopy[0].textContent, 'Only send ETH to an Ethereum address.', 'Send screen has copy') + + const sendFromField = $('.send-v2__form-field') + assert.ok(sendFromField[0], 'send screen has a from field') + + let sendFromFieldItemAddress = $('.account-list-item__account-name') + assert.equal(sendFromFieldItemAddress[0].textContent, 'Send Account 4', 'send from field shows correct account name') + + const sendFromFieldItem = $('.account-list-item') + sendFromFieldItem[0].click() + + await timeout() + + const sendFromDropdownList = $('.send-v2__from-dropdown__list') + assert.equal(sendFromDropdownList.children().length, 4, 'send from dropdown shows all accounts') + console.log(`!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! sendFromDropdownList.children()[1]`, sendFromDropdownList.children()[1]); + sendFromDropdownList.children()[1].click() + + await timeout() + + sendFromFieldItemAddress = $('.account-list-item__account-name') + console.log(`!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! sendFromFieldItemAddress[0]`, sendFromFieldItemAddress[0]); + assert.equal(sendFromFieldItemAddress[0].textContent, 'Send Account 2', 'send from field dropdown changes account name') + + let sendToFieldInput = $('.send-v2__to-autocomplete__input') + sendToFieldInput[0].focus() + + await timeout() + + const sendToDropdownList = $('.send-v2__from-dropdown__list') + assert.equal(sendToDropdownList.children().length, 5, 'send to dropdown shows all accounts and address book accounts') + + sendToDropdownList.children()[2].click() + + await timeout() + + const sendToAccountAddress = sendToFieldInput.val() + assert.equal(sendToAccountAddress, '0x2f8d4a878cfa04a6e60d46362f5644deab66572d', 'send to dropdown selects the correct address') + + const sendAmountField = $('.send-v2__form-row:eq(2)') + sendAmountField.find('.currency-display')[0].click() + + await timeout() + + const sendAmountFieldInput = sendAmountField.find('input:text') + sendAmountFieldInput.val('5.1') + reactTriggerChange(sendAmountField.find('input')[0]) + + await timeout() + + let errorMessage = $('.send-v2__error') + assert.equal(errorMessage[0].textContent, 'Insufficient funds.', 'send should render an insufficient fund error message') + + sendAmountFieldInput.val('2.0') + reactTriggerChange(sendAmountFieldInput[0]) + + await timeout() + errorMessage = $('.send-v2__error') + assert.equal(errorMessage.length, 0, 'send should stop rendering amount error message after amount is corrected') + + const sendGasField = $('.send-v2__gas-fee-display') + assert.equal( + sendGasField.find('.currency-display__input-wrapper > input').val(), + '0.000198', + 'send gas field should show estimated gas total' + ) + assert.equal( + sendGasField.find('.currency-display__converted-value')[0].textContent, + '0.24 USD', + 'send gas field should show estimated gas total converted to USD' + ) + + const sendGasOpenCustomizeModalButton = $('.send-v2__sliders-icon-container' + ) + sendGasOpenCustomizeModalButton[0].click() + + await timeout(1000) + + const customizeGasModal = $('.send-v2__customize-gas') + assert.ok(customizeGasModal[0], 'should render the customize gas modal') + + const customizeGasPriceInput = $('.send-v2__gas-modal-card').first().find('input') + customizeGasPriceInput.val(50) + reactTriggerChange(customizeGasPriceInput[0]) + const customizeGasLimitInput = $('.send-v2__gas-modal-card').last().find('input') + customizeGasLimitInput.val(60000) + reactTriggerChange(customizeGasLimitInput[0]) + + await timeout() + + const customizeGasSaveButton = $('.send-v2__customize-gas__save') + customizeGasSaveButton[0].click() + + await timeout() + + assert.equal( + sendGasField.find('.currency-display__input-wrapper > input').val(), + '0.003', + 'send gas field should show customized gas total' + ) + assert.equal( + sendGasField.find('.currency-display__converted-value')[0].textContent, + '3.60 USD', + 'send gas field should show customized gas total converted to USD' + ) + + const sendButton = $('button.btn-clear.page-container__footer-button') + assert.equal(sendButton[0].textContent, 'Next', 'next button rendered') + sendButton[0].click() + + await timeout(2000) + + selectState.val('send edit') + reactTriggerChange(selectState[0]) + + await timeout(2000) + + const confirmFromName = $('.confirm-screen-account-name').first() + assert.equal(confirmFromName[0].textContent, 'Send Account 2', 'confirm screen should show correct from name') + + const confirmToName = $('.confirm-screen-account-name').last() + assert.equal(confirmToName[0].textContent, 'Send Account 3', 'confirm screen should show correct to name') + + const confirmScreenRows = $('.confirm-screen-rows') + const confirmScreenGas = confirmScreenRows.find('.confirm-screen-row-info')[2] + assert.equal(confirmScreenGas.textContent, '3.6 USD', 'confirm screen should show correct gas') + const confirmScreenTotal = confirmScreenRows.find('.confirm-screen-row-info')[3] + assert.equal(confirmScreenTotal.textContent, '2405.36 USD', 'confirm screen should show correct total') + + const confirmScreenBackButton = $('.confirm-screen-back-button') + confirmScreenBackButton[0].click() + + await timeout(1000) + + const sendFromFieldItemInEdit = $('.account-list-item') + sendFromFieldItemInEdit[0].click() + + await timeout() + + const sendFromDropdownListInEdit = $('.send-v2__from-dropdown__list') + sendFromDropdownListInEdit.children()[2].click() + + await timeout() + + const sendToFieldInputInEdit = $('.send-v2__to-autocomplete__input') + sendToFieldInputInEdit[0].focus() + sendToFieldInputInEdit.val('0xd85a4b6a394794842887b8284293d69163007bbb') + + await timeout() + + const sendAmountFieldInEdit = $('.send-v2__form-row:eq(2)') + sendAmountFieldInEdit.find('.currency-display')[0].click() + + await timeout() + + const sendAmountFieldInputInEdit = sendAmountFieldInEdit.find('input:text') + sendAmountFieldInputInEdit.val('1.0') + reactTriggerChange(sendAmountFieldInputInEdit[0]) + + await timeout() + + const sendButtonInEdit = $('.btn-clear.page-container__footer-button') + assert.equal(sendButtonInEdit[0].textContent, 'Next', 'next button in edit rendered') + sendButtonInEdit[0].click() + + await timeout() + + // TODO: Need a way to mock background so that we can test correct transition from editing to confirm + selectState.val('confirm new ui') + reactTriggerChange(selectState[0]) + + await timeout(2000) + const confirmScreenConfirmButton = $('.confirm-screen-confirm-button') + console.log(`+++++++++++++++++++++++++++++++= confirmScreenConfirmButton[0]`, confirmScreenConfirmButton[0]); + confirmScreenConfirmButton[0].click() + + await timeout(2000) + + const txView = $('.tx-view') + console.log(`++++++++++++++++++++++++++++++++ txView[0]`, txView[0]); + + assert.ok(txView[0], 'Should return to the account details screen after confirming') +} + +function timeout (time) { + return new Promise((resolve, reject) => { + setTimeout(resolve, time || 1500) + }) +}
\ No newline at end of file diff --git a/test/lib/migrations/002.json b/test/lib/migrations/002.json new file mode 100644 index 000000000..9ad3d4cfe --- /dev/null +++ b/test/lib/migrations/002.json @@ -0,0 +1 @@ +{"meta":{"version":20},"data":{"config":{},"NetworkController":{"provider":{"type":"mainnet","rpcTarget":"https://mainnet.infura.io/metamask"},"network":"1"},"firstTimeInfo":{"version":"3.12.1","date":1517351427287},"NoticeController":{"noticesList":[{"read":false,"date":"Thu Feb 09 2017","title":"Terms of Use","body":"# Terms of Use #\n\n**THIS AGREEMENT IS SUBJECT TO BINDING ARBITRATION AND A WAIVER OF CLASS ACTION RIGHTS AS DETAILED IN SECTION 13. PLEASE READ THE AGREEMENT CAREFULLY.**\n\n_Our Terms of Use have been updated as of September 5, 2016_\n\n## 1. Acceptance of Terms ##\n\nMetaMask provides a platform for managing Ethereum (or \"ETH\") accounts, and allowing ordinary websites to interact with the Ethereum blockchain, while keeping the user in control over what transactions they approve, through our website located at[ ](http://metamask.io)[https://metamask.io/](https://metamask.io/) and browser plugin (the \"Site\") — which includes text, images, audio, code and other materials (collectively, the “Content”) and all of the features, and services provided. The Site, and any other features, tools, materials, or other services offered from time to time by MetaMask are referred to here as the “Service.” Please read these Terms of Use (the “Terms” or “Terms of Use”) carefully before using the Service. By using or otherwise accessing the Services, or clicking to accept or agree to these Terms where that option is made available, you (1) accept and agree to these Terms (2) consent to the collection, use, disclosure and other handling of information as described in our Privacy Policy and (3) any additional terms, rules and conditions of participation issued by MetaMask from time to time. If you do not agree to the Terms, then you may not access or use the Content or Services.\n\n## 2. Modification of Terms of Use ##\n\nExcept for Section 13, providing for binding arbitration and waiver of class action rights, MetaMask reserves the right, at its sole discretion, to modify or replace the Terms of Use at any time. The most current version of these Terms will be posted on our Site. You shall be responsible for reviewing and becoming familiar with any such modifications. Use of the Services by you after any modification to the Terms constitutes your acceptance of the Terms of Use as modified.\n\n\n\n## 3. Eligibility ##\n\nYou hereby represent and warrant that you are fully able and competent to enter into the terms, conditions, obligations, affirmations, representations and warranties set forth in these Terms and to abide by and comply with these Terms.\n\nMetaMask is a global platform and by accessing the Content or Services, you are representing and warranting that, you are of the legal age of majority in your jurisdiction as is required to access such Services and Content and enter into arrangements as provided by the Service. You further represent that you are otherwise legally permitted to use the service in your jurisdiction including owning cryptographic tokens of value, and interacting with the Services or Content in any way. You further represent you are responsible for ensuring compliance with the laws of your jurisdiction and acknowledge that MetaMask is not liable for your compliance with such laws.\n\n## 4 Account Password and Security ##\n\nWhen setting up an account within MetaMask, you will be responsible for keeping your own account secrets, which may be a twelve-word seed phrase, an account file, or other locally stored secret information. MetaMask encrypts this information locally with a password you provide, that we never send to our servers. You agree to (a) never use the same password for MetaMask that you have ever used outside of this service; (b) keep your secret information and password confidential and do not share them with anyone else; (c) immediately notify MetaMask of any unauthorized use of your account or breach of security. MetaMask cannot and will not be liable for any loss or damage arising from your failure to comply with this section.\n\n## 5. Representations, Warranties, and Risks ##\n\n### 5.1. Warranty Disclaimer ###\n\nYou expressly understand and agree that your use of the Service is at your sole risk. The Service (including the Service and the Content) are provided on an \"AS IS\" and \"as available\" basis, without warranties of any kind, either express or implied, including, without limitation, implied warranties of merchantability, fitness for a particular purpose or non-infringement. You acknowledge that MetaMask has no control over, and no duty to take any action regarding: which users gain access to or use the Service; what effects the Content may have on you; how you may interpret or use the Content; or what actions you may take as a result of having been exposed to the Content. You release MetaMask from all liability for you having acquired or not acquired Content through the Service. MetaMask makes no representations concerning any Content contained in or accessed through the Service, and MetaMask will not be responsible or liable for the accuracy, copyright compliance, legality or decency of material contained in or accessed through the Service.\n\n### 5.2 Sophistication and Risk of Cryptographic Systems ###\n\nBy utilizing the Service or interacting with the Content or platform in any way, you represent that you understand the inherent risks associated with cryptographic systems; and warrant that you have an understanding of the usage and intricacies of native cryptographic tokens, like Ether (ETH) and Bitcoin (BTC), smart contract based tokens such as those that follow the Ethereum Token Standard (https://github.com/ethereum/EIPs/issues/20), and blockchain-based software systems.\n\n### 5.3 Risk of Regulatory Actions in One or More Jurisdictions ###\n\nMetaMask and ETH could be impacted by one or more regulatory inquiries or regulatory action, which could impede or limit the ability of MetaMask to continue to develop, or which could impede or limit your ability to access or use the Service or Ethereum blockchain.\n\n### 5.4 Risk of Weaknesses or Exploits in the Field of Cryptography ###\n\nYou acknowledge and understand that Cryptography is a progressing field. Advances in code cracking or technical advances such as the development of quantum computers may present risks to cryptocurrencies and Services of Content, which could result in the theft or loss of your cryptographic tokens or property. To the extent possible, MetaMask intends to update the protocol underlying Services to account for any advances in cryptography and to incorporate additional security measures, but does not guarantee or otherwise represent full security of the system. By using the Service or accessing Content, you acknowledge these inherent risks.\n\n### 5.5 Volatility of Crypto Currencies ###\n\nYou understand that Ethereum and other blockchain technologies and associated currencies or tokens are highly volatile due to many factors including but not limited to adoption, speculation, technology and security risks. You also acknowledge that the cost of transacting on such technologies is variable and may increase at any time causing impact to any activities taking place on the Ethereum blockchain. You acknowledge these risks and represent that MetaMask cannot be held liable for such fluctuations or increased costs.\n\n### 5.6 Application Security ###\n\nYou acknowledge that Ethereum applications are code subject to flaws and acknowledge that you are solely responsible for evaluating any code provided by the Services or Content and the trustworthiness of any third-party websites, products, smart-contracts, or Content you access or use through the Service. You further expressly acknowledge and represent that Ethereum applications can be written maliciously or negligently, that MetaMask cannot be held liable for your interaction with such applications and that such applications may cause the loss of property or even identity. This warning and others later provided by MetaMask in no way evidence or represent an on-going duty to alert you to all of the potential risks of utilizing the Service or Content.\n\n## 6. Indemnity ##\n\nYou agree to release and to indemnify, defend and hold harmless MetaMask and its parents, subsidiaries, affiliates and agencies, as well as the officers, directors, employees, shareholders and representatives of any of the foregoing entities, from and against any and all losses, liabilities, expenses, damages, costs (including attorneys’ fees and court costs) claims or actions of any kind whatsoever arising or resulting from your use of the Service, your violation of these Terms of Use, and any of your acts or omissions that implicate publicity rights, defamation or invasion of privacy. MetaMask reserves the right, at its own expense, to assume exclusive defense and control of any matter otherwise subject to indemnification by you and, in such case, you agree to cooperate with MetaMask in the defense of such matter.\n\n## 7. Limitation on liability ##\n\nYOU ACKNOWLEDGE AND AGREE THAT YOU ASSUME FULL RESPONSIBILITY FOR YOUR USE OF THE SITE AND SERVICE. YOU ACKNOWLEDGE AND AGREE THAT ANY INFORMATION YOU SEND OR RECEIVE DURING YOUR USE OF THE SITE AND SERVICE MAY NOT BE SECURE AND MAY BE INTERCEPTED OR LATER ACQUIRED BY UNAUTHORIZED PARTIES. YOU ACKNOWLEDGE AND AGREE THAT YOUR USE OF THE SITE AND SERVICE IS AT YOUR OWN RISK. RECOGNIZING SUCH, YOU UNDERSTAND AND AGREE THAT, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, NEITHER METAMASK NOR ITS SUPPLIERS OR LICENSORS WILL BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY OR OTHER DAMAGES OF ANY KIND, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER TANGIBLE OR INTANGIBLE LOSSES OR ANY OTHER DAMAGES BASED ON CONTRACT, TORT, STRICT LIABILITY OR ANY OTHER THEORY (EVEN IF METAMASK HAD BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES), RESULTING FROM THE SITE OR SERVICE; THE USE OR THE INABILITY TO USE THE SITE OR SERVICE; UNAUTHORIZED ACCESS TO OR ALTERATION OF YOUR TRANSMISSIONS OR DATA; STATEMENTS OR CONDUCT OF ANY THIRD PARTY ON THE SITE OR SERVICE; ANY ACTIONS WE TAKE OR FAIL TO TAKE AS A RESULT OF COMMUNICATIONS YOU SEND TO US; HUMAN ERRORS; TECHNICAL MALFUNCTIONS; FAILURES, INCLUDING PUBLIC UTILITY OR TELEPHONE OUTAGES; OMISSIONS, INTERRUPTIONS, LATENCY, DELETIONS OR DEFECTS OF ANY DEVICE OR NETWORK, PROVIDERS, OR SOFTWARE (INCLUDING, BUT NOT LIMITED TO, THOSE THAT DO NOT PERMIT PARTICIPATION IN THE SERVICE); ANY INJURY OR DAMAGE TO COMPUTER EQUIPMENT; INABILITY TO FULLY ACCESS THE SITE OR SERVICE OR ANY OTHER WEBSITE; THEFT, TAMPERING, DESTRUCTION, OR UNAUTHORIZED ACCESS TO, IMAGES OR OTHER CONTENT OF ANY KIND; DATA THAT IS PROCESSED LATE OR INCORRECTLY OR IS INCOMPLETE OR LOST; TYPOGRAPHICAL, PRINTING OR OTHER ERRORS, OR ANY COMBINATION THEREOF; OR ANY OTHER MATTER RELATING TO THE SITE OR SERVICE.\n\nSOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES. ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.\n\n## 8. Our Proprietary Rights ##\n\nAll title, ownership and intellectual property rights in and to the Service are owned by MetaMask or its licensors. You acknowledge and agree that the Service contains proprietary and confidential information that is protected by applicable intellectual property and other laws. Except as expressly authorized by MetaMask, you agree not to copy, modify, rent, lease, loan, sell, distribute, perform, display or create derivative works based on the Service, in whole or in part. MetaMask issues a license for MetaMask, found [here](https://github.com/MetaMask/metamask-plugin/blob/master/LICENSE). For information on other licenses utilized in the development of MetaMask, please see our attribution page at: [https://metamask.io/attributions.html](https://metamask.io/attributions.html)\n\n## 9. Links ##\n\nThe Service provides, or third parties may provide, links to other World Wide Web or accessible sites, applications or resources. Because MetaMask has no control over such sites, applications and resources, you acknowledge and agree that MetaMask is not responsible for the availability of such external sites, applications or resources, and does not endorse and is not responsible or liable for any content, advertising, products or other materials on or available from such sites or resources. You further acknowledge and agree that MetaMask shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.\n\n## 10. Termination and Suspension ##\n\nMetaMask may terminate or suspend all or part of the Service and your MetaMask access immediately, without prior notice or liability, if you breach any of the terms or conditions of the Terms. Upon termination of your access, your right to use the Service will immediately cease.\n\nThe following provisions of the Terms survive any termination of these Terms: INDEMNITY; WARRANTY DISCLAIMERS; LIMITATION ON LIABILITY; OUR PROPRIETARY RIGHTS; LINKS; TERMINATION; NO THIRD PARTY BENEFICIARIES; BINDING ARBITRATION AND CLASS ACTION WAIVER; GENERAL INFORMATION.\n\n## 11. No Third Party Beneficiaries ##\n\nYou agree that, except as otherwise expressly provided in these Terms, there shall be no third party beneficiaries to the Terms.\n\n## 12. Notice and Procedure For Making Claims of Copyright Infringement ##\n\nIf you believe that your copyright or the copyright of a person on whose behalf you are authorized to act has been infringed, please provide MetaMask’s Copyright Agent a written Notice containing the following information:\n\n· an electronic or physical signature of the person authorized to act on behalf of the owner of the copyright or other intellectual property interest;\n\n· a description of the copyrighted work or other intellectual property that you claim has been infringed;\n\n· a description of where the material that you claim is infringing is located on the Service;\n\n· your address, telephone number, and email address;\n\n· a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law;\n\n· a statement by you, made under penalty of perjury, that the above information in your Notice is accurate and that you are the copyright or intellectual property owner or authorized to act on the copyright or intellectual property owner's behalf.\n\nMetaMask’s Copyright Agent can be reached at:\n\nEmail: copyright [at] metamask [dot] io\n\nMail:\n\nAttention:\n\nMetaMask Copyright ℅ ConsenSys\n\n49 Bogart Street\n\nBrooklyn, NY 11206\n\n## 13. Binding Arbitration and Class Action Waiver ##\n\nPLEASE READ THIS SECTION CAREFULLY – IT MAY SIGNIFICANTLY AFFECT YOUR LEGAL RIGHTS, INCLUDING YOUR RIGHT TO FILE A LAWSUIT IN COURT\n\n### 13.1 Initial Dispute Resolution ###\n\nThe parties shall use their best efforts to engage directly to settle any dispute, claim, question, or disagreement and engage in good faith negotiations which shall be a condition to either party initiating a lawsuit or arbitration.\n\n### 13.2 Binding Arbitration ###\n\nIf the parties do not reach an agreed upon solution within a period of 30 days from the time informal dispute resolution under the Initial Dispute Resolution provision begins, then either party may initiate binding arbitration as the sole means to resolve claims, subject to the terms set forth below. Specifically, all claims arising out of or relating to these Terms (including their formation, performance and breach), the parties’ relationship with each other and/or your use of the Service shall be finally settled by binding arbitration administered by the American Arbitration Association in accordance with the provisions of its Commercial Arbitration Rules and the supplementary procedures for consumer related disputes of the American Arbitration Association (the \"AAA\"), excluding any rules or procedures governing or permitting class actions.\n\nThe arbitrator, and not any federal, state or local court or agency, shall have exclusive authority to resolve all disputes arising out of or relating to the interpretation, applicability, enforceability or formation of these Terms, including, but not limited to any claim that all or any part of these Terms are void or voidable, or whether a claim is subject to arbitration. The arbitrator shall be empowered to grant whatever relief would be available in a court under law or in equity. The arbitrator’s award shall be written, and binding on the parties and may be entered as a judgment in any court of competent jurisdiction.\n\nThe parties understand that, absent this mandatory provision, they would have the right to sue in court and have a jury trial. They further understand that, in some instances, the costs of arbitration could exceed the costs of litigation and the right to discovery may be more limited in arbitration than in court.\n\n### 13.3 Location ###\n\nBinding arbitration shall take place in New York. You agree to submit to the personal jurisdiction of any federal or state court in New York County, New York, in order to compel arbitration, to stay proceedings pending arbitration, or to confirm, modify, vacate or enter judgment on the award entered by the arbitrator.\n\n### 13.4 Class Action Waiver ###\n\nThe parties further agree that any arbitration shall be conducted in their individual capacities only and not as a class action or other representative action, and the parties expressly waive their right to file a class action or seek relief on a class basis. YOU AND METAMASK AGREE THAT EACH MAY BRING CLAIMS AGAINST THE OTHER ONLY IN YOUR OR ITS INDIVIDUAL CAPACITY, AND NOT AS A PLAINTIFF OR CLASS MEMBER IN ANY PURPORTED CLASS OR REPRESENTATIVE PROCEEDING. If any court or arbitrator determines that the class action waiver set forth in this paragraph is void or unenforceable for any reason or that an arbitration can proceed on a class basis, then the arbitration provision set forth above shall be deemed null and void in its entirety and the parties shall be deemed to have not agreed to arbitrate disputes.\n\n### 13.5 Exception - Litigation of Intellectual Property and Small Claims Court Claims ###\n\nNotwithstanding the parties' decision to resolve all disputes through arbitration, either party may bring an action in state or federal court to protect its intellectual property rights (\"intellectual property rights\" means patents, copyrights, moral rights, trademarks, and trade secrets, but not privacy or publicity rights). Either party may also seek relief in a small claims court for disputes or claims within the scope of that court’s jurisdiction.\n\n### 13.6 30-Day Right to Opt Out ###\n\nYou have the right to opt-out and not be bound by the arbitration and class action waiver provisions set forth above by sending written notice of your decision to opt-out to the following address: MetaMask ℅ ConsenSys, 49 Bogart Street, Brooklyn NY 11206 and via email at legal-opt@metamask.io. The notice must be sent within 30 days of September 6, 2016 or your first use of the Service, whichever is later, otherwise you shall be bound to arbitrate disputes in accordance with the terms of those paragraphs. If you opt-out of these arbitration provisions, MetaMask also will not be bound by them.\n\n### 13.7 Changes to This Section ###\n\nMetaMask will provide 60-days’ notice of any changes to this section. Changes will become effective on the 60th day, and will apply prospectively only to any claims arising after the 60th day.\n\nFor any dispute not subject to arbitration you and MetaMask agree to submit to the personal and exclusive jurisdiction of and venue in the federal and state courts located in New York, New York. You further agree to accept service of process by mail, and hereby waive any and all jurisdictional and venue defenses otherwise available.\n\nThe Terms and the relationship between you and MetaMask shall be governed by the laws of the State of New York without regard to conflict of law provisions.\n\n## 14. General Information ##\n\n### 14.1 Entire Agreement ###\n\nThese Terms (and any additional terms, rules and conditions of participation that MetaMask may post on the Service) constitute the entire agreement between you and MetaMask with respect to the Service and supersedes any prior agreements, oral or written, between you and MetaMask. In the event of a conflict between these Terms and the additional terms, rules and conditions of participation, the latter will prevail over the Terms to the extent of the conflict.\n\n### 14.2 Waiver and Severability of Terms ###\n\nThe failure of MetaMask to exercise or enforce any right or provision of the Terms shall not constitute a waiver of such right or provision. If any provision of the Terms is found by an arbitrator or court of competent jurisdiction to be invalid, the parties nevertheless agree that the arbitrator or court should endeavor to give effect to the parties' intentions as reflected in the provision, and the other provisions of the Terms remain in full force and effect.\n\n### 14.3 Statute of Limitations ###\n\nYou agree that regardless of any statute or law to the contrary, any claim or cause of action arising out of or related to the use of the Service or the Terms must be filed within one (1) year after such claim or cause of action arose or be forever barred.\n\n### 14.4 Section Titles ###\n\nThe section titles in the Terms are for convenience only and have no legal or contractual effect.\n\n### 14.5 Communications ###\n\nUsers with questions, complaints or claims with respect to the Service may contact us using the relevant contact information set forth above and at communications@metamask.io.\n\n## 15 Related Links ##\n\n**[Terms of Use](https://metamask.io/terms.html)**\n\n**[Privacy](https://metamask.io/privacy.html)**\n\n**[Attributions](https://metamask.io/attributions.html)**\n\n","id":0},{"read":false,"date":"Mon May 08 2017","title":"Privacy Notice","body":"MetaMask is beta software. \n\nWhen you log in to MetaMask, your current account is visible to every new site you visit.\n\nFor your privacy, for now, please sign out of MetaMask when you're done using a site.\n\nAlso, by default, you will be signed in to a test network. To use real Ether, you must connect to the main network manually in the top left network menu.\n\n","id":2}]},"BlacklistController":{"phishing":{"version":2,"tolerance":2,"fuzzylist":["metamask.io","myetherwallet.com","cryptokitties.co"],"whitelist":["metahash.io","metahash.net","metahash.org","cryptotitties.com","cryptocities.net","cryptoshitties.co","cryptotitties.fun","cryptokitties.forsale","cryptokitties.care","metamate.cc","metamesh.tech","ico.nexus.social","metamesh.org","metatask.io","metmask.com","metarasa.com","metapack.com","metacase.com","metafas.nl","metamako.com","metamast.com","metamax.ru","metadesk.io","metadisk.com","metallsk.ru","metamag.fr","metamaks.ru","metamap.ru","metamaps.cc","metamats.com","metamax.by","metamax.com","metamax.io","metamuse.net","metarank.com","metaxas.com","megamas2.ru","metamask.io","myetherwallet.com","myethlerwallet.com","ethereum.org","myetheroll.com","myetherapi.com","ledgerwallet.com","databrokerdao.com","etherscan.io","etherid.org","ether.cards","etheroll.com","ethnews.com","ethex.market","ethereumdev.io","ethereumdev.kr","dether.io","ethermine.org","slaask.com","etherbtc.io","ethereal.capital","etherisc.com","m.famalk.net","etherecho.com","ethereum.os.tc","theethereum.wiki","metajack.im","etherhub.io","ethereum.network","ethereum.link","ethereum.com","prethereum.org","ethereumj.io","etheraus.com","ethereum.dev","1ethereum.ru","ethereum.nz","nethereum.com","metabank.com","metamas.com","aventus.io","metabase.com","etherdelta.com","metabase.one","cryptokitties.co"],"blacklist":["myetherwallet.uk.com","kodakone.cc","nyeihitervvallet.com","xn--myeterwalet-cm8eoi.com","nucleus.foundation","beetoken-ico.com","data-token.com","tron-labs.com","ocoin.tech","aionfoundation.com","ico-telegram.org","nyeihitervvallat.com","telegramcoin.us","daddi.cloud","daditoken.com","blockarray.org","dadi-cloud.net","wanchainfunding.org","ico-telegram.io","iconfoundation.site","iost.co","beetoken-ico.eu","cindicator.network","wanchainetwork.org","wamchain.org","wanchainltd.org","wanchainalliance.org","nucleus-vision.net","ledgerwallet.by","nucleuss.vision","myenhterswailct.com","cobin-hood.com","wanchainfoundation.org","xn--polniex-ex4c.com","xn--polniex-s1a.com","xn--polonex-ieb.com","xn--polonex-sza.com","xn--polonex-zw4c.com","xn--polonix-ws4c.com","xn--polonix-y8a.com","xn--pooniex-ojb.com","gramico.info","dimnsions.network","www-gemini.com","login-kucoin.net","venchain.foundation","grampreico.com","tgram.cc","ton-gramico.com","wwwpaywithink.com","coniomi.com","paywithnk.com","paywithlnk.com","iluminatto.com.br","pundix.eu","xn--bttrx-esay.com","xn--bttrex-w8a.com","xn--bnance-bwa.com","xn--shpeshift-11a.com","xn--shapeshif-ts6d.com","xn--shapshift-yf7d.com","wwwbluzelle.com","bluzelie.com","nucleus-vision.org","omisegonetwork.site","etlherzero.com","etlherdelta.com","xn--condesk-0ya.com","xn--condesk-sfb.com","xn--coindsk-vs4c.com","iexecplatform.com","tongramico.com","nucleus-vision.eu","intchain.network","wanchain.cloud","bluzelle-ico.com","ethzero-wallet.com","xn--metherwalle-jb9et7d.com","xn--coinesk-jo3c.com","venchainfoundation.com","myenhtersvvailot.com","ether-zero.net","ins.foundation","nastoken.org","telcointoken.com","ether0.org","eterzero.org","bluzelle-ico.eu","bleuzelle.com","appcoinstoken.org","xn--quanstamp-8s6d.com","myehntersvvailct.com","myeherwalllet.com","ico-bluzelle.com","bluzelle.im","bluzelle.one","bluzele.sale","bluzele.co","sether.ws","xn--myetherwalet-6gf.com","xn--rnyethewaliet-om1g.com","rnyethervailet.com","mvetherwaliet.com","rnyetherwailet.com","myethervaliet.com","rnyethervaliet.com","mvetherwalilet.com","xn--myethewalie-3ic0947g.com","xn--mthrwallet-z6ac3y.com","xn--myeherwalie-vici.com","xn--myethervvalie-8vc.com","xn--mythrwallt-06acf.com","xn--mtherwallet-y9a6y.com","myetherwallet.applytoken.tk","ethereum-zero.com","quanstamptoken.tk","bluzelle.network","ether-wallet.org","tron-wallet.info","appcoinsproject.com","vechain.foundation","tronlab.site","tronlabs.network","bluzelle.cc","ethblender.com","ethpaperwallet.net","waltontoken.org","icoselfkey.org","etherzeroclaim.com","etherzero.promo","bluzelle.pro","token-selfkey.org","xn--etherdlta-0f7d.com","sether.in","xn--ttrex-ysa9423c.com","bluzelle.eu","bluzelle.site","gifto.tech","xn--os-g7s.com","selfkey.co","xn--myeherwalet-ns8exy.com","xn--coinelegraph-wk5f.com","dai-stablecoin.com","eos-token.org","venchain.org","gatcoins.io","deepbrainchain.co","myetherwalililet.info","myehvterwallet.com","myehterumswallet.com","nucleusico.com","tronlab.tech","0x-project.com","gift-token-events.mywebcommunity.org","funfairtoken.org","breadtokenapp.com","cloudpetstore.com","myethwalilet.com","selfkeys.org","wallet-ethereum.com","xn--methrwallt-26ar0z.com","xn--mytherwllet-r8a0c.com","bluzelle.promo","tokensale.bluzelle.promo","cedarlake.org","marketingleads4u.com","cashaa.co","xn--inance-hrb.com","wanchain.tech","zenprolocol.com","ethscan.io","etherscan.in","props-project.com","zilliaq.com","reqestnetwork.com","etherdelta.pw","ethereum-giveaway.org","mysimpletoken.org","binancc.com","blnance.org","elherdelta.io","xn--hapeshit-ez9c2y.com","tenxwallet.co","singularitynet.info","mytlherwaliet.info","iconmainnet.ml","tokenselfkey.org","xn--myetewallet-cm8e5y.com","envione.org","myetherwalletet.com","claimbcd.com","ripiocreditnetwork.in","xn--yeterwallet-ml8euo.com","ethclassicwallet.info","myltherwallet.ru.com","etherdella.com","xn--yeterwallet-bm8ewn.com","singularty.net","cloudkitties.co","iconfoundation.io","kittystat.com","gatscoin.io","singularitynet.in","sale.canay.io","canay.io","wabicoin.co","envion.top","sirinslabs.com","tronlab.co","paxful.com.ng","changellyli.com","ethereum-code.com","xn--plonex-6va6c.com","envion.co","envion.cc","envion.site","ethereumchain.info","xn--envon-1sa.org","xn--btstamp-rfb.net","envlon.org","envion-ico.org","spectivvr.org","sirinlbs.com","ethereumdoubler.life","xn--myetherwllet-fnb.com","sirin-labs.com","sirin-labs.org","envion.one","envion.live","propsproject.org","propsprojects.com","decentralland.org","xn--metherwalet-ns8ep4b.com","redpulsetoken.co","propsproject.tech","xn--myeterwalet-nl8emj.com","powrerledger.com","cryptokitties.com","sirinlabs.pro","sirinlabs.co","sirnlabs.com","superbitcoin-blockchain.info","hellobloom.me","mobus.network","powrrledger.com","xn--myeherwalet-ms8eyy.com","qlink-ico.com","gatcoin.in","tokensale.gamefllp.com","gamefllp.com","xn--myeherwalle-vici.com","xn--myetherwalet-39b.com","xn--polonex-ffb.com","xn--birex-leba.com","raiden-network.org","sirintabs.com","xn--metherwallt-79a30a.com","xn--myethrwllet-2kb3p.com","myethlerwallet.eu","xn--btrex-b4a.com","powerrledger.com","xn--cointeegraph-wz4f.com","myerherwalet.com","qauntstanp.com","myetherermwallet.com","xn--myethewalet-ns8eqq.com","xn--nvion-hza.org","nnyetherwallelt.ru.com","ico-wacoin.com","xn--myeterwalet-nl8enj.com","bitcoinsilver.io","t0zero.com","tokensale.gizer.in","gizer.in","wabitoken.com","gladius.ws","xn--metherwallt-8bb4w.com","quanttstamp.com","gladius.im","ethereumstorage.net","powerledgerr.com","xn--myeherwallet-4j5f.com","quamtstamp.com","quntstamp.com","xn--changely-j59c.com","shapeshlft.com","coinbasenews.co.uk","xn--metherwallet-hmb.com","envoin.org","powerledger.com","bitstannp.net","xn--myetherallet-4k5fwn.com","xn--coinbas-pya.com","requestt.network","oracls.network","sirinlabs.website","powrledger.io","slackconfirm.com","shape-shift.io","oracles-network.org","xn--myeherwalle-zb9eia.com","blockstack.one","urtust.io","bittrex.one","t0-ico.com","xn--cinbase-90a.com","xn--metherwalet-ns8ez1g.com","tzero-ico.com","tzero.su","tzero.website","blockstack.network","ico-tzero.com","spectre.site","tzero.pw","spectre-ai.net","xn--waxtokn-y8a.com","dmarket.pro","bittrex.com11648724328774.cf","bittrex.com1987465798.ga","autcus.org","t-zero.org","xn--zero-zxb.com","myetherwalletfork.com","blokclbain.info","datum.sale","spectre-ai.org","powerledgr.com","simpletoken.live","sale.simpletoken.live","qauntstamp.com","raiden-network.com","metalpayme.com","quantstamp-ico.com","myetherwailetclient.com","biockchain.biz","wallets-blockchain.com","golemairdrop.com","omisegoairdrop.net","blodkchainwallet.info","walton-chain.org","elite888-ico.com","bitflyerjp.com","chainlinksmartcontract.com","stormtoken.eu","omise-go.tech","saltending.com","stormltoken.com","xn--quanttamp-42b.com","stormtoken.co","storntoken.com","stromtoken.com","storm-token.com","stormtokens.io","ether-delta.com","ethconnect.live","ethconnect.trade","xn--bttrex-3va.net","quantstamp.com.co","wancha.in","augur-network.com","quantstamp.com.ua","myetherwalletmew.com","myetherumwalletts.com","xn--quanstamp-tmd.com","quantsstamps.com","changellyl.net","xn--myetherwalet-1fb.com","myethereumwallets.com","xn--myetherwalet-e9b.com","quantslamp.com","metelpay.com","xn--eterdelta-m75d.com","linksmartcontract.com","myetherwalletaccess.com","myetherwalletcheck.com","myetherwalletcheck.info","myetherwalletconf.com","myetherwalleteal.com","myetherwalletec.com","myetherwalletgeth.com","myetherwalletmetamask.com","myetherwalletmm.com","myetherwalletmy.com","myetherwalletnh.com","myetherwalletnod.com","myetherwalletrr.com","myetherwalletrty.com","myetherwalletsec.com","myetherwalletsecure.com","myetherwalletutc.com","myetherwalletver.info","myetherwalletview.com","myetherwalletview.info","myetherwalletvrf.com","myetherwalletmist.com","myetherwalletext.com","myetherwalletjson.com","mettalpay.com","bricklblock.io","bittrexy.com","utrust.so","myethierwallet.org","metallpay.com","kraken-wallet.com","dmarkt.io","etherdeltla.com","unlversa.io","universa.sale","mercuryprotocol.live","ripiocredlt.network","myetlherwa11et.com","dentacoin.in","rdrtg.com","myetherwallet.com.rdrgh.com","rdrgh.com","ripiocreditnetwork.co","riaden.network","hydrominer.biz","rdrblock.com","reqest.network","senstoken.com","myetherwallat.services","ripiocredit.net","xn--metherwallet-c06f.com","ico.ripiocredits.com","ripiocredits.com","raidens.network","artoken.co","myetherwalletlgn.com","etherblog.click","stormtoken.site","httpmyetherwallet.com","myetherwalletverify.com","byzantiumfork.com","myetherwallet.com.byzantiumfork.com","www-myethervvallet.com","ether24.info","block-v.io","bittrex.cash","shapishift.io","ripiocerdit.network","rnyetherwa11et.com","claimether.com","enigmatokensale.com","ethereum-org.com","mvetnerwallet.com","myctherwallet.com","myetherwaltet.com","myetherwatlet.com","privatix.me","myetherwalletcnf.com","myetherwalletver.com","privatix.top","privatix.pro","privatex.io","stormtoken.cc","raiden.online","stormstoken.com","myetereumwallet.com","stormtokens.net","myetherwalletconf.info","storrntoken.com","worldofbattles.io","ico.worldofbattles.io","privatix.live","riden.network","raidan.network","ralden.network","mymyetherwallet.com","myetherwallets.net","myetherwalletverify.info","stormxtoken.com","myethereum-wallet.com","myetherwallet-forkprep.pagedemo.co","myetnerwailet.com","www-mvetherwallet.com","etheirdelta.com","myetherwalletiu.com","myetherwaiiett.com","xn--mytherwalet-cbb87i.com","xn--myethrwallet-ivb.co","xn--myeterwallet-f1b.com","myehterwaliet.com","omegaone.co","myetherwaiietw.com","slack.com.ru","polkodot.network","request-network.net","requestnetwork.live","binancie.com","first-eth.info","myewerthwalliet.com","enjincoin.pw","xn--bitrex-k17b.com","alrswap.io","www-request.network","myetnenwallet.com","www-enigma.co","cryptoinsidenews.com","air-swap.tech","launch.airswap.cc","airswap.cc","airswaptoken.com","launch.airswap.in","airswap.in","security-steemit.com.mx","blockchalnwallet.com","blodkchainwallet.com","blodkchaln.com","myethereumwaiiet.com","myethereumwaliet.com","myethereumwalilet.com","myetherswailet.com","myetherswaliet.com","myetherswalilet.com","myetherwalilett.com","myetherwalletl.com","myetherwalletww.com","myethereunwallet.com","myethereumwallct.com","myetherwaiieti.com","myetherwaiiete.com","upfirng.com","paypie.net","paypie.tech","soam.co","myetherwaiict.com","numerai-token.com","www-bankera.com","vvanchain.org","omisegoairdrop.com","xn--enjncoin-41a.io","suncontract.su","myetherwaiietr.com","shapeshiff.io","warchain.org","myethwallett.com","myethervvaliet.com","wanchains.org","etherparty.in","enjincoin.me","etiam.io","invest.smartlands.tech","smartlands.tech","enijncoin.io","wanchain.network","nimiq.su","enjincoin.sale","tenxwallet.io","golem-network.net","myyethwallet.ml","mywetherwailiet.com","omg-omise.com","district0x.tech","centra-token.com","etherdetla.com","etnerparty.io","etherdelta.su","myetherwallett.neocities.org","myetherwallet-secure.com","myethereumwalletntw.info","real-markets.io","wallet-ethereum.org","request-network.com","shapeshifth.io","shiapeshift.in","coin.red-puise.com","ibittreix.com","coinkbase.com","cindicator.pro","myetherwallet.com.ailogin.me","eventchain.co","kinkik.in","myetherumwalletview.com","protostokenhub.com","coinrbase.com","myetherwalletlogin.com","omisegotoken.com","myethereumwalletntw.com","reall.markets","cobinhood.org","cobinhood.io","happy-coin.org","bitfinex.com.co","bitfienex.com","iconn.foundation","centra.vip","smartcontract.live","icon.community","air-token.com","centra.credit","myetherwallet-singin.com","smartcontractlink.com","shapesshift.io","0xtoken.io","augurproject.co","ethereumus.one","myetherumwalet.com","myetherwalletsignin.com","change-bank.org","charge-bank.com","myetherwalletsingin.com","myetherwalletcontract.com","change-bank.io","chainlink.tech","myetherwallet-confirm.com","tokensale.kybernet.network","kybernet.network","kyberr.network","kybernetwork.io","myetherwalletconfirm.com","kvnuke.github.io","kin.kikpro.co","myethereumwallet.co.uk","tokensale-kyber.network","kyber-network.co","tokensale.kyber-network.co","pyro0.github.io","tokensale.kyber.digital","kyber.digital","omise-go.me","my.etherwallet.com.de","bepartof.change-bank.co","change-bank.co","enigma-tokens.co","coinbase.com.eslogin.co","xn--bittrx-mva.com","ethrdelta.github.io","etherdellta.com","ico-nexus.social","red-pulse.tech","bitj0b.io","xn--bttrex-bwa.com","kin-klk.com","kin-crowdsale.com","ethedelta.com","coindash.su","myethwallet.co.uk","swarm.credit","myethereumwallet.uk","iconexu.social","wanchain.co","enigrna.co","linknetwork.co","qtum-token.com","omisego.com.co","rivetzintl.org","etherdelta.one","the-ether.pro","etherdelta.gitnub.io","kirkik.com","monetha.ltd","vlberate.io","ethereumwallet-kr.info","omise-go.org","iconexus.social","bittirrex.com","aventus.pro","atlant.solutions","aventus.group","metamak.io","omise.com.co","herotokens.io","starbase.pro","etherdelta.githulb.io","herotoken.co","kinico.net","dmarket.ltd","etherdelta.gilthub.io","golem-network.com","etnerscan.io","bllttriex.com","monetha.me","monetha.co","monetha-crowdsale.com","starbase.tech","aventus-crowdsale.com","shapeshift.pro","bllttrex.com","kickico.co","statustoken.im","bilttrex.com","tenxpay.io","bittrex.ltd","metalpay.im","aragon.im","coindash.tech","decentraland.tech","decentraland.pro","status-token.com","bittrex.cam","enigmatoken.com","unocoin.company","unocoin.fund","0xproject.io","0xtoken.com","numerai.tech","decentraiand.org","blockcrein.info","blockchealn.info","bllookchain.info","blockcbhain.info","myetherwallet.com.ethpromonodes.com","mettamask.io","tokenswap.org","netherum.com","etherexx.org","etherume.io","ethereum.plus","ehtereum.org","etereurm.org","etheream.com","ethererum.org","ethereum.io","etherdelta-glthub.com","cryptoalliance.herokuapp.com","bitspark2.com","indorsetoken.com","iconexus.tk","iconexus.ml","iconexus.ga","iconexus.cf","etherwallet.online","wallet-ethereum.net","bitsdigit.com","etherswap.org","eos.ac","uasfwallet.com","ziber.io","multiply-ethereum.info","bittrex.comze.com","karbon.vacau.com","etherdelta.gitlhub.io","etherdelta.glthub.io","digitaldevelopersfund.vacau.com","district-0x.io","coin-dash.com","coindash.ru","district0x.net","aragonproject.io","coin-wallet.info","coinswallet.info","contribute-status.im","ether-api.com","ether-wall.com","mycoinwallet.net","ethereumchamber.com","ethereumchamber.net","ethereumchest.com","ethewallet.com","myetherwallet.com.vc","myetherwallet.com.pe","myetherwallet.us.com","myetherwallet.com.u0387831.cp.regruhosting.ru","myethereumwallet.su","myetherweb.com.de","myetherieumwallet.com","myetehrwallet.com","myeterwalet.com","myetherwaiiet.com","myetherwallet.info","myetherwallet.ch","myetherwallet.om","myethervallet.com","myetherwallet.com.cm","myetherwallet.com.co","myetherwallet.com.de","myetherwallet.com.gl","myetherwallet.com.im","myetherwallet.com.ua","secure-myetherwallet.com","update-myetherwallet.com","wwwmyetherwallet.com","myeatherwallet.com","myetharwallet.com","myelherwallel.com","myetherwaillet.com","myetherwaliet.com","myetherwallel.com","myetherwallet.cam","myetherwallet.cc","myetherwallet.co","myetherwallet.cm","myetherwallet.cz","myetherwallet.org","myetherwallet.tech","myetherwallet.top","myetherwallet.net","myetherwallet.ru.com","myetherwallet.com.ru","metherwallet.com","myetrerwallet.com","myetlerwallet.com","myethterwallet.com","myethwallet.io","myethterwallet.co","myehterwallet.co","myaetherwallet.com","myetthterwallet.com","myetherwallet.one","myelterwallet.com","myetherwallet.gdn","myetherwallt.com","myeterwallet.com","myeteherwallet.com","myethearwailet.com","myetherwallelt.com","myetherwallett.com","etherwallet.org","myetherewallet.com","myeherwallet.com","myethcrwallet.com","myetherwallet.link","myetherwallets.com","myethearwaillet.com","myethearwallet.com","myetherawllet.com","myethereallet.com","myetherswallet.com","myetherwalet.com","myetherwaller.com","myetherwalliet.com","myetherwllet.com","etherwallet.io","myetherwallet.ca","myetherwallet.me","myetherwallet.ru","myetherwallet.xyz","myetherwallte.com","myethirwallet.com","myethrewallet.com","etherwallet.net","maetherwallet.com","meyetherwallet.com","my.ether-wallet.pw","myehterwallet.com","myeitherwallet.com","myelherwallet.com","myeltherwallet.com","myerherwallet.com","myethearwalet.com","myetherewalle.com","myethervvallet.com","myetherwallent.com","myetherwallet.fm","myetherwalllet.com","myetherwalltet.com","myetherwollet.com","myetlherwalet.com","myetlherwallet.com","rnyetherwallet.com","etherclassicwallet.com","omg-omise.co","omise-go.com","omise-go.net","omise-omg.com","omise-go.io","tenx-tech.com","bitclaive.com","tokensale-tenx.tech","ubiqcoin.org","metamask.com","ethtrade.io","myetcwallet.com","account-kigo.net","bitcoin-wallet.net","blocklichan.info","bloclkicihan.info","coindash.ml","eos-bonus.com","eos-io.info","ether-wallet.net","ethereum-wallet.info","ethereum-wallet.net","ethereumchest.net","reservations-kigo.net","reservations-lodgix.com","secure-liverez.com","secure-onerooftop.com","settings-liverez.com","software-liverez.com","software-lodgix.com","unhackableetherwallets.com","www-myetherwallet.com","etherwallet.co.za","etherwalletchain.com","etherwallets.net","etherwallets.nl","my-ethwallet.com","my.ether-wallet.co","myetherwallet.com.am","myetherwallet.com.ht","myetherwalletcom.com","myehterwailet.com","xn--myetherwalle-xoc.com","xn--myetherwalle-44i.com","xn--myetherwalle-xhk.com","xn--myetherwallt-cfb.com","xn--myetherwallt-6tb.com","xn--myetherwallt-xub.com","xn--myetherwallt-ovb.com","xn--myetherwallt-fwb.com","xn--myetherwallt-5wb.com","xn--myetherwallt-jzi.com","xn--myetherwallt-2ck.com","xn--myetherwallt-lok.com","xn--myetherwallt-lsl.com","xn--myetherwallt-ce6f.com","xn--myetherwalet-mcc.com","xn--myetherwalet-xhf.com","xn--myetherwalet-lcc.com","xn--myetherwaet-15ba.com","xn--myetherwalet-whf.com","xn--myetherwaet-v2ea.com","xn--myetherwllet-59a.com","xn--myetherwllet-jbb.com","xn--myetherwllet-wbb.com","xn--myetherwllet-9bb.com","xn--myetherwllet-ncb.com","xn--myetherwllet-0cb.com","xn--myetherwllet-5nb.com","xn--myetherwllet-ktd.com","xn--myetherwllet-mre.com","xn--myetherwllet-76e.com","xn--myetherwllet-o0l.com","xn--myetherwllet-c45f.com","xn--myetherallet-ejn.com","xn--myethewallet-4nf.com","xn--myethewallet-iof.com","xn--myethewallet-mpf.com","xn--myethewallet-6bk.com","xn--myethewallet-i31f.com","xn--myethrwallet-feb.com","xn--myethrwallt-fbbf.com","xn--myethrwallet-seb.com","xn--myethrwallt-rbbf.com","xn--myethrwallet-5eb.com","xn--myethrwallt-3bbf.com","xn--myethrwallet-0tb.com","xn--myethrwallt-tpbf.com","xn--myethrwallet-rub.com","xn--myethrwallt-iqbf.com","xn--myethrwallet-ivb.com","xn--myethrwallt-6qbf.com","xn--myethrwallet-8vb.com","xn--myethrwallt-vrbf.com","xn--myethrwallet-zwb.com","xn--myethrwallt-ksbf.com","xn--myethrwallet-dzi.com","xn--myethrwallt-wbif.com","xn--myethrwallet-wck.com","xn--myethrwallt-skjf.com","xn--myethrwallet-fok.com","xn--myethrwallt-fvjf.com","xn--myethrwallet-fsl.com","xn--myethrwallt-fwkf.com","xn--myethrwallet-5d6f.com","xn--myethrwallt-319ef.com","xn--myeterwallet-ufk.com","xn--myeterwallet-nrl.com","xn--myeterwallet-von.com","xn--myeterwallet-jl6c.com","xn--myeherwallet-ooc.com","xn--myeherwalle-6hci.com","xn--myeherwallet-v4i.com","xn--myeherwalle-zgii.com","xn--myeherwallet-ohk.com","xn--myeherwalle-6oji.com","xn--mytherwallet-ceb.com","xn--mythrwallet-cbbc.com","xn--mythrwallt-c7acf.com","xn--mytherwallet-peb.com","xn--mythrwallet-obbc.com","xn--mythrwallt-n7acf.com","xn--mytherwallet-2eb.com","xn--mythrwallet-0bbc.com","xn--mythrwallt-y7acf.com","xn--mytherwallet-xtb.com","xn--mythrwallet-qpbc.com","xn--mythrwallt-jlbcf.com","xn--mytherwallet-oub.com","xn--mythrwallet-fqbc.com","xn--mythrwallt-5lbcf.com","xn--mythrwallet-3qbc.com","xn--mythrwallt-smbcf.com","xn--mytherwallet-5vb.com","xn--mythrwallet-srbc.com","xn--mythrwallt-fnbcf.com","xn--mytherwallet-wwb.com","xn--mythrwallet-hsbc.com","xn--mythrwallt-1nbcf.com","xn--mytherwallet-9yi.com","xn--mythrwallet-tbic.com","xn--mythrwallt-dnhcf.com","xn--mytherwallet-tck.com","xn--mythrwallet-pkjc.com","xn--mythrwallt-lsicf.com","xn--mytherwallet-cok.com","xn--mythrwallet-cvjc.com","xn--mythrwallt-c2icf.com","xn--mytherwallet-csl.com","xn--mythrwallet-cwkc.com","xn--mythrwallt-c0jcf.com","xn--mytherwallet-2d6f.com","xn--mythrwallet-019ec.com","xn--mythrwallt-yq3ecf.com","xn--metherwallet-qlb.com","xn--metherwallet-1uf.com","xn--metherwallet-iyi.com","xn--metherwallet-zhk.com","xn--metherwallet-3ml.com","xn--mytherwallet-fvb.com","xn--myetherwallt-7db.com","xn--myetherwallt-leb.com","xn--myetherwallt-yeb.com","xn--yetherwallet-vjf.com","xn--yetherwallet-dfk.com","xn--yetherwallet-1t1f.com","xn--yetherwallet-634f.com","xn--myeherwallet-fpc.com","xn--myethewallt-crb.com","xn--metherwallet-1vc.com","xn--myeherwallt-kbb8039g.com","xn--myeherwallet-vk5f.com","xn--yethewallet-iw8ejl.com","xn--bittrx-th8b.com","xn--polniex-n0a.com","thekey.vin","thekey-vip.com","digitexftures.com","ethzero-wallet.org","zeepln.io","wepowers.network","wepower.vision"]}},"CurrencyController":{"currentCurrency":"usd","conversionRate":1112,"conversionDate":1517351401}}}
\ No newline at end of file diff --git a/test/lib/shallow-with-store.js b/test/lib/shallow-with-store.js new file mode 100644 index 000000000..9df10a3c5 --- /dev/null +++ b/test/lib/shallow-with-store.js @@ -0,0 +1,20 @@ +const { shallow, mount } = require('enzyme') + +module.exports = { + shallowWithStore, + mountWithStore, +} + +function shallowWithStore (component, store) { + const context = { + store, + } + return shallow(component, {context}) +} + +function mountWithStore (component, store) { + const context = { + store, + } + return mount(component, {context}) +} diff --git a/test/stub/blacklist.json b/test/stub/blacklist.json new file mode 100644 index 000000000..6a3230b2f --- /dev/null +++ b/test/stub/blacklist.json @@ -0,0 +1,1374 @@ +{ + "version": 2, + "tolerance": 2, + "fuzzylist": [ + "metamask.io", + "myetherwallet.com", + "cryptokitties.co", + "mycrypto.com" + ], + "whitelist": [ + "crypto.pro", + "ocrypto.org", + "wecrypto.net", + "iccrypto.io", + "crypto.kred", + "ohmycrypto.io", + "spcrypto.net", + "melcrypto.com", + "zzcrypto.org", + "zzcrypto.net", + "crypto.bg", + "mycrypto24.online", + "acrypto.io", + "mycrypto.ca", + "scrypto.io", + "mycrypto.dk", + "mvzcrypto.com", + "ambcrypto.com", + "crypto.bi", + "crypto.jobs", + "crypto.help", + "my.crypt.observer", + "crypt.observer", + "ucrypto.com", + "cryptojobslist.com", + "crypto.review", + "crypto.me", + "b3crypto.com", + "mycrypto.ninja", + "jkcrypto.com", + "crypto.cr", + "mycrypto.live", + "yocrypto.io", + "crypto.ba", + "zacrypto.info", + "mycrypto.com", + "remix.ethereum.org", + "metahash.io", + "metahash.net", + "metahash.org", + "cryptotitties.com", + "cryptocities.net", + "cryptoshitties.co", + "cryptotitties.fun", + "cryptokitties.forsale", + "cryptokitties.care", + "metamate.cc", + "metamesh.tech", + "ico.nexus.social", + "metamesh.org", + "metatask.io", + "metmask.com", + "metarasa.com", + "metapack.com", + "metacase.com", + "metafas.nl", + "metamako.com", + "metamast.com", + "metamax.ru", + "metadesk.io", + "metadisk.com", + "metallsk.ru", + "metamag.fr", + "metamaks.ru", + "metamap.ru", + "metamaps.cc", + "metamats.com", + "metamax.by", + "metamax.com", + "metamax.io", + "metamuse.net", + "metarank.com", + "metaxas.com", + "megamas2.ru", + "metamask.io", + "myetherwallet.com", + "myethlerwallet.com", + "ethereum.org", + "myetheroll.com", + "myetherapi.com", + "ledgerwallet.com", + "databrokerdao.com", + "etherscan.io", + "etherid.org", + "ether.cards", + "etheroll.com", + "ethnews.com", + "ethex.market", + "ethereumdev.io", + "ethereumdev.kr", + "dether.io", + "ethermine.org", + "slaask.com", + "etherbtc.io", + "ethereal.capital", + "etherisc.com", + "m.famalk.net", + "etherecho.com", + "ethereum.os.tc", + "theethereum.wiki", + "metajack.im", + "etherhub.io", + "ethereum.network", + "ethereum.link", + "ethereum.com", + "prethereum.org", + "ethereumj.io", + "etheraus.com", + "ethereum.dev", + "1ethereum.ru", + "ethereum.nz", + "nethereum.com", + "metabank.com", + "metamas.com", + "aventus.io", + "metabase.com", + "etherdelta.com", + "metabase.one", + "cryptokitties.co", + "remme.io", + "jibrel.network" + ], + "blacklist": [ + "xn--myethrwalle-jb9e19a.com", + "xn--myetheralle-7b9ezl.com", + "iconfoundation.co", + "fundrequest.info", + "xn--myetherwale-os8e7x.com", + "remme-ico.eu", + "gonetwork.live", + "token.gonetwork.pro", + "gonetwork.pro", + "gonetwork.eu", + "nucleus-vision.cc", + "jibreltoken.in", + "dock.so", + "dock.promo", + "xn--mycrypt-r0a.com", + "xn--mycrypt-g1a.com", + "xn--mycrpto-y2a.com", + "ethexploit.org", + "remme.in", + "remme.ws", + "remme.com.ng", + "nyeitthervvallet.com", + "xn--myeerhwailet-ooc.com", + "myeterhwaliot.com", + "remme.live", + "xn--yethewalle-to2exkhi.com", + "myetherwallet.custom-token.com", + "custom-token.com", + "sale-earn.com", + "bankera.live", + "originprotocol.io", + "trx.foundation", + "tokensale.adhive.net", + "adhive.net", + "decentral.market", + "cryptoexploite.com", + "blockclain.net", + "xn--blckchin-5za9o.info", + "xn--blkhain-m0a4pb.info", + "xn--blocchal-gmb8m.info", + "xn--blocchaln-orb.info", + "xn--blocchan-gmb7c.info", + "xn--blockaden-lsen-5pb.com", + "xn--blockchai-3vb.info", + "xn--blockchai-jvb.info", + "xn--blockchal-3vb.info", + "xn--blockcham-ipb.info", + "xn--blockchan-2pb.com", + "xn--blockchan-75a.com", + "xn--blockchan-7sb.info", + "xn--blockchan-d5a.net", + "xn--blockchan-dob.info", + "xn--blockchan-ipb.com", + "xn--blockchan-ipb.info", + "xn--blockchan-nk7d.com", + "xn--blockchan-xub.info", + "xn--blockchann-4ub.com", + "xn--blockchi-n7a50e.info", + "xn--blockchi-o8a54d.info", + "xn--blockchi-p99co8a.com", + "xn--blockchim-hdb.info", + "xn--blockchin-1xb.info", + "xn--blockchin-61a.info", + "xn--blockchin-61a.net", + "xn--blockchin-6ib.info", + "xn--blockchin-ccb.info", + "xn--blockchin-h4a.com", + "xn--blockchin-h4a.info", + "xn--blockchin-hdb.info", + "xn--blockchin-hhb.info", + "xn--blockchin-mib.net", + "xn--blockchin-wcb.com", + "xn--blockchn-fza4j.com", + "xn--blockchn-fza4j.info", + "xn--blockchn-n7a43b.info", + "xn--blockchn-p0a.info", + "xn--blockchn-tx0d4p.com", + "xn--blockclai-3vb.info", + "xn--blockclin-hdb.com", + "xn--blockclin-hdb.info", + "xn--blockclin-hdb.org", + "xn--blockflte-kirchrode-w6b.de", + "xn--blockfltenquartett-windspiel-81c.de", + "xn--blockhai-obb78c.info", + "xn--blockhain-4eb.com", + "xn--blockhain-pfb.com", + "xn--blockhain-pfb.info", + "xn--blockhain-zdb.info", + "xn--blockhan-obb65a.info", + "xn--blockhas-d6a.com", + "xn--blockwallt-j7a.com", + "xn--blokchai-fqb.info", + "xn--blokchain-nfb.info", + "xn--blokhain-28ab.info", + "xn--bockclnain-eyb.info", + "xn--mymoeo-zt7bzf.com", + "xn--mymoer-nqc1368c.com", + "xn--mymoero-c13c.com", + "xn--mymoero-s13c.com", + "xn--mymoneo-f63c.com", + "xn--mymoneo-v63c.com", + "xn--mymoneo-y53c.com", + "xn--mymoner-j0a.com", + "xn--mymoner-j5b.com", + "xn--mymoner-r0a.com", + "xn--mymoner-z0a.com", + "xn--mymoner-z2c.com", + "xn--mymonro-fya.com", + "xn--mymonro-x8a.com", + "xn--myetheallet-l58emu.com", + "xn--myetheraet-9k2ea77h.com", + "xn--myetheralet-ms8e21b.com", + "xn--myetheralle-7b9exm.com", + "xn--myetherallet-5s5f.com", + "xn--myetherallet-fs5f.com", + "xn--myetherewalle-1t1g.com", + "xn--myetherllet-pl9e6k.com", + "xn--myethervvalle-8vc.com", + "xn--myetherwaet-61ea.com", + "xn--myetherwaet-8eda.com", + "xn--myetherwaet-ns8ea.com", + "xn--myetherwale-ns8e8x.com", + "xn--myetherwalet-0fb.com", + "xn--myetherwalet-0z4f.com", + "xn--myetherwalet-814f.com", + "xn--myetherwalet-d9b.com", + "xn--myetherwalet-h14f.com", + "xn--myetherwalle-9me.com", + "xn--myetherwalle-ek5f.com", + "xn--myetherwalle-fqc.com", + "xn--myetherwalle-opc.com", + "xn--myetherwalle-q05f.com", + "xn--myetherwllet-wob.com", + "xn--myetherwllt-r7a0i.com", + "xn--myethewaliet-9d5f.com", + "xn--myethewalle-3ic0947g.com", + "xn--myethewallet-0e5f.com", + "xn--myethewallet-1kc.com", + "xn--myethewallet-bkc.com", + "xn--myethewallet-vof.com", + "xn--myethewalliet-nm1g.com", + "xn--myethewallt-kbb3019g.com", + "xn--myethewallt-w48ew7b.com", + "xn--myethrwalet-6qb6408g.com", + "xn--myethrwalet-ms8e83d.com", + "xn--myethrwallet-1db.com", + "xn--myethrwallt-29af.com", + "xn--myethrwallt-29as.com", + "xn--myethrwllet-q7a31e.com", + "xn--myethrwllet-r8a3c.com", + "fintrux.eu", + "refereum-ico.eu", + "arcblock-ico.org", + "xn--fuson-1sa.org", + "refereum-token.com", + "fintrux.co", + "ico-ton.org", + "xn--mytherwallt-cbbv.com", + "xmoneta.co", + "data-wallet.co", + "tokensale.data-wallet.co", + "xn--myeerhwallot-ooc.com", + "xn--myeterwalet-cm8epi.com", + "xn--myeterwalle-cm8ev6a.com", + "rnyetherumwallet.com", + "republic-protocol.net", + "nyeihitervvallatt.com", + "arcblock.eu", + "republicprotocol.eu", + "tokensale-fusion.com", + "myetherwalletjoin.com", + "medicalchian.com", + "myeahteirwaliet.com", + "myenhtersvvailct.com", + "trinity-token.com", + "xn--eo-yzs.com", + "zilliqa.in", + "sparc.pro", + "myetherwallet.import-tokens.com", + "token-gram.org", + "xn--shapshift-e4a.com", + "xn--shapshift-y4a.com", + "xn--shpeshift-c2a.com", + "xn--shpeshift-r1a.com", + "xn--shapshift-o4a.com", + "xn--shpeshift-w2a.com", + "xn--shapeshft-w5a.com", + "tokensale-fusion.org", + "fusion-ico.com", + "beetolen.com", + "tokencrowdsale.online", + "fusion.tokencrowdsale.online", + "beetokem.com", + "block.chaiins.in", + "origintrail.in", + "bit-z.ru", + "xn--myetherallet-nu5f.com", + "xn--mytherwalet-3qb08c.com", + "xn--myeterwllet-cm8et1d.com", + "xn--mytherwllet-q7a01e.com", + "xn--biance-xt7b.com", + "xn--bnance-wic.com", + "xn--biance-jeb.com", + "xn--bttrx-9za8334c.com", + "wwwkodakcoin.com", + "myetherwallet.uk.com", + "kodakone.cc", + "nyeihitervvallet.com", + "xn--myeterwalet-cm8eoi.com", + "nucleus.foundation", + "beetoken-ico.com", + "data-token.com", + "tron-labs.com", + "ocoin.tech", + "aionfoundation.com", + "ico-telegram.org", + "nyeihitervvallat.com", + "telegramcoin.us", + "daddi.cloud", + "daditoken.com", + "blockarray.org", + "dadi-cloud.net", + "wanchainfunding.org", + "ico-telegram.io", + "iconfoundation.site", + "iost.co", + "beetoken-ico.eu", + "cindicator.network", + "wanchainetwork.org", + "wamchain.org", + "wanchainltd.org", + "wanchainalliance.org", + "nucleus-vision.net", + "ledgerwallet.by", + "nucleuss.vision", + "myenhterswailct.com", + "cobin-hood.com", + "wanchainfoundation.org", + "xn--polniex-ex4c.com", + "xn--polniex-s1a.com", + "xn--polonex-ieb.com", + "xn--polonex-sza.com", + "xn--polonex-zw4c.com", + "xn--polonix-ws4c.com", + "xn--polonix-y8a.com", + "xn--pooniex-ojb.com", + "gramico.info", + "dimnsions.network", + "www-gemini.com", + "login-kucoin.net", + "venchain.foundation", + "grampreico.com", + "tgram.cc", + "ton-gramico.com", + "wwwpaywithink.com", + "coniomi.com", + "paywithnk.com", + "paywithlnk.com", + "iluminatto.com.br", + "pundix.eu", + "xn--bttrx-esay.com", + "xn--bttrex-w8a.com", + "xn--bnance-bwa.com", + "xn--shpeshift-11a.com", + "xn--shapeshif-ts6d.com", + "xn--shapshift-yf7d.com", + "wwwbluzelle.com", + "bluzelie.com", + "nucleus-vision.org", + "omisegonetwork.site", + "etlherzero.com", + "etlherdelta.com", + "xn--condesk-0ya.com", + "xn--condesk-sfb.com", + "xn--coindsk-vs4c.com", + "iexecplatform.com", + "tongramico.com", + "nucleus-vision.eu", + "intchain.network", + "wanchain.cloud", + "bluzelle-ico.com", + "ethzero-wallet.com", + "xn--metherwalle-jb9et7d.com", + "xn--coinesk-jo3c.com", + "venchainfoundation.com", + "myenhtersvvailot.com", + "ether-zero.net", + "ins.foundation", + "nastoken.org", + "telcointoken.com", + "ether0.org", + "eterzero.org", + "bluzelle-ico.eu", + "bleuzelle.com", + "appcoinstoken.org", + "xn--quanstamp-8s6d.com", + "myehntersvvailct.com", + "myeherwalllet.com", + "ico-bluzelle.com", + "bluzelle.im", + "bluzelle.one", + "bluzele.sale", + "bluzele.co", + "sether.ws", + "xn--myetherwalet-6gf.com", + "xn--rnyethewaliet-om1g.com", + "rnyethervailet.com", + "mvetherwaliet.com", + "rnyetherwailet.com", + "myethervaliet.com", + "rnyethervaliet.com", + "mvetherwalilet.com", + "xn--myethewalie-3ic0947g.com", + "xn--mthrwallet-z6ac3y.com", + "xn--myeherwalie-vici.com", + "xn--myethervvalie-8vc.com", + "xn--mythrwallt-06acf.com", + "xn--mtherwallet-y9a6y.com", + "myetherwallet.applytoken.tk", + "ethereum-zero.com", + "quanstamptoken.tk", + "bluzelle.network", + "ether-wallet.org", + "tron-wallet.info", + "appcoinsproject.com", + "vechain.foundation", + "tronlab.site", + "tronlabs.network", + "bluzelle.cc", + "ethblender.com", + "ethpaperwallet.net", + "waltontoken.org", + "icoselfkey.org", + "etherzeroclaim.com", + "etherzero.promo", + "bluzelle.pro", + "token-selfkey.org", + "xn--etherdlta-0f7d.com", + "sether.in", + "xn--ttrex-ysa9423c.com", + "bluzelle.eu", + "bluzelle.site", + "gifto.tech", + "xn--os-g7s.com", + "selfkey.co", + "xn--myeherwalet-ns8exy.com", + "xn--coinelegraph-wk5f.com", + "dai-stablecoin.com", + "eos-token.org", + "venchain.org", + "gatcoins.io", + "deepbrainchain.co", + "myetherwalililet.info", + "myehvterwallet.com", + "myehterumswallet.com", + "nucleusico.com", + "tronlab.tech", + "0x-project.com", + "gift-token-events.mywebcommunity.org", + "funfairtoken.org", + "breadtokenapp.com", + "cloudpetstore.com", + "myethwalilet.com", + "selfkeys.org", + "wallet-ethereum.com", + "xn--methrwallt-26ar0z.com", + "xn--mytherwllet-r8a0c.com", + "bluzelle.promo", + "tokensale.bluzelle.promo", + "cedarlake.org", + "marketingleads4u.com", + "cashaa.co", + "xn--inance-hrb.com", + "wanchain.tech", + "zenprolocol.com", + "ethscan.io", + "etherscan.in", + "props-project.com", + "zilliaq.com", + "reqestnetwork.com", + "etherdelta.pw", + "ethereum-giveaway.org", + "mysimpletoken.org", + "binancc.com", + "blnance.org", + "elherdelta.io", + "xn--hapeshit-ez9c2y.com", + "tenxwallet.co", + "singularitynet.info", + "mytlherwaliet.info", + "iconmainnet.ml", + "tokenselfkey.org", + "xn--myetewallet-cm8e5y.com", + "envione.org", + "myetherwalletet.com", + "claimbcd.com", + "ripiocreditnetwork.in", + "xn--yeterwallet-ml8euo.com", + "ethclassicwallet.info", + "myltherwallet.ru.com", + "etherdella.com", + "xn--yeterwallet-bm8ewn.com", + "singularty.net", + "cloudkitties.co", + "iconfoundation.io", + "kittystat.com", + "gatscoin.io", + "singularitynet.in", + "sale.canay.io", + "canay.io", + "wabicoin.co", + "envion.top", + "sirinslabs.com", + "tronlab.co", + "paxful.com.ng", + "changellyli.com", + "ethereum-code.com", + "xn--plonex-6va6c.com", + "envion.co", + "envion.cc", + "envion.site", + "ethereumchain.info", + "xn--envon-1sa.org", + "xn--btstamp-rfb.net", + "envlon.org", + "envion-ico.org", + "spectivvr.org", + "sirinlbs.com", + "ethereumdoubler.life", + "xn--myetherwllet-fnb.com", + "sirin-labs.com", + "sirin-labs.org", + "envion.one", + "envion.live", + "propsproject.org", + "propsprojects.com", + "decentralland.org", + "xn--metherwalet-ns8ep4b.com", + "redpulsetoken.co", + "propsproject.tech", + "xn--myeterwalet-nl8emj.com", + "powrerledger.com", + "cryptokitties.com", + "sirinlabs.pro", + "sirinlabs.co", + "sirnlabs.com", + "superbitcoin-blockchain.info", + "hellobloom.me", + "mobus.network", + "powrrledger.com", + "xn--myeherwalet-ms8eyy.com", + "qlink-ico.com", + "gatcoin.in", + "tokensale.gamefllp.com", + "gamefllp.com", + "xn--myeherwalle-vici.com", + "xn--myetherwalet-39b.com", + "xn--polonex-ffb.com", + "xn--birex-leba.com", + "raiden-network.org", + "sirintabs.com", + "xn--metherwallt-79a30a.com", + "xn--myethrwllet-2kb3p.com", + "myethlerwallet.eu", + "xn--btrex-b4a.com", + "powerrledger.com", + "xn--cointeegraph-wz4f.com", + "myerherwalet.com", + "qauntstanp.com", + "myetherermwallet.com", + "xn--myethewalet-ns8eqq.com", + "xn--nvion-hza.org", + "nnyetherwallelt.ru.com", + "ico-wacoin.com", + "xn--myeterwalet-nl8enj.com", + "bitcoinsilver.io", + "t0zero.com", + "tokensale.gizer.in", + "gizer.in", + "wabitoken.com", + "gladius.ws", + "xn--metherwallt-8bb4w.com", + "quanttstamp.com", + "gladius.im", + "ethereumstorage.net", + "powerledgerr.com", + "xn--myeherwallet-4j5f.com", + "quamtstamp.com", + "quntstamp.com", + "xn--changely-j59c.com", + "shapeshlft.com", + "coinbasenews.co.uk", + "xn--metherwallet-hmb.com", + "envoin.org", + "powerledger.com", + "bitstannp.net", + "xn--myetherallet-4k5fwn.com", + "xn--coinbas-pya.com", + "requestt.network", + "oracls.network", + "sirinlabs.website", + "powrledger.io", + "slackconfirm.com", + "shape-shift.io", + "oracles-network.org", + "xn--myeherwalle-zb9eia.com", + "blockstack.one", + "urtust.io", + "bittrex.one", + "t0-ico.com", + "xn--cinbase-90a.com", + "xn--metherwalet-ns8ez1g.com", + "tzero-ico.com", + "tzero.su", + "tzero.website", + "blockstack.network", + "ico-tzero.com", + "spectre.site", + "tzero.pw", + "spectre-ai.net", + "xn--waxtokn-y8a.com", + "dmarket.pro", + "bittrex.com11648724328774.cf", + "bittrex.com1987465798.ga", + "autcus.org", + "t-zero.org", + "xn--zero-zxb.com", + "myetherwalletfork.com", + "blokclbain.info", + "datum.sale", + "spectre-ai.org", + "powerledgr.com", + "simpletoken.live", + "sale.simpletoken.live", + "qauntstamp.com", + "raiden-network.com", + "metalpayme.com", + "quantstamp-ico.com", + "myetherwailetclient.com", + "biockchain.biz", + "wallets-blockchain.com", + "golemairdrop.com", + "omisegoairdrop.net", + "blodkchainwallet.info", + "walton-chain.org", + "elite888-ico.com", + "bitflyerjp.com", + "chainlinksmartcontract.com", + "stormtoken.eu", + "omise-go.tech", + "saltending.com", + "stormltoken.com", + "xn--quanttamp-42b.com", + "stormtoken.co", + "storntoken.com", + "stromtoken.com", + "storm-token.com", + "stormtokens.io", + "ether-delta.com", + "ethconnect.live", + "ethconnect.trade", + "xn--bttrex-3va.net", + "quantstamp.com.co", + "wancha.in", + "augur-network.com", + "quantstamp.com.ua", + "myetherwalletmew.com", + "myetherumwalletts.com", + "xn--quanstamp-tmd.com", + "quantsstamps.com", + "changellyl.net", + "xn--myetherwalet-1fb.com", + "myethereumwallets.com", + "xn--myetherwalet-e9b.com", + "quantslamp.com", + "metelpay.com", + "xn--eterdelta-m75d.com", + "linksmartcontract.com", + "myetherwalletaccess.com", + "myetherwalletcheck.com", + "myetherwalletcheck.info", + "myetherwalletconf.com", + "myetherwalleteal.com", + "myetherwalletec.com", + "myetherwalletgeth.com", + "myetherwalletmetamask.com", + "myetherwalletmm.com", + "myetherwalletmy.com", + "myetherwalletnh.com", + "myetherwalletnod.com", + "myetherwalletrr.com", + "myetherwalletrty.com", + "myetherwalletsec.com", + "myetherwalletsecure.com", + "myetherwalletutc.com", + "myetherwalletver.info", + "myetherwalletview.com", + "myetherwalletview.info", + "myetherwalletvrf.com", + "myetherwalletmist.com", + "myetherwalletext.com", + "myetherwalletjson.com", + "mettalpay.com", + "bricklblock.io", + "bittrexy.com", + "utrust.so", + "myethierwallet.org", + "metallpay.com", + "kraken-wallet.com", + "dmarkt.io", + "etherdeltla.com", + "unlversa.io", + "universa.sale", + "mercuryprotocol.live", + "ripiocredlt.network", + "myetlherwa11et.com", + "dentacoin.in", + "rdrtg.com", + "myetherwallet.com.rdrgh.com", + "rdrgh.com", + "ripiocreditnetwork.co", + "riaden.network", + "hydrominer.biz", + "rdrblock.com", + "reqest.network", + "senstoken.com", + "myetherwallat.services", + "ripiocredit.net", + "xn--metherwallet-c06f.com", + "ico.ripiocredits.com", + "ripiocredits.com", + "raidens.network", + "artoken.co", + "myetherwalletlgn.com", + "etherblog.click", + "stormtoken.site", + "httpmyetherwallet.com", + "myetherwalletverify.com", + "byzantiumfork.com", + "myetherwallet.com.byzantiumfork.com", + "www-myethervvallet.com", + "ether24.info", + "block-v.io", + "bittrex.cash", + "shapishift.io", + "ripiocerdit.network", + "rnyetherwa11et.com", + "claimether.com", + "enigmatokensale.com", + "ethereum-org.com", + "mvetnerwallet.com", + "myctherwallet.com", + "myetherwaltet.com", + "myetherwatlet.com", + "privatix.me", + "myetherwalletcnf.com", + "myetherwalletver.com", + "privatix.top", + "privatix.pro", + "privatex.io", + "stormtoken.cc", + "raiden.online", + "stormstoken.com", + "myetereumwallet.com", + "stormtokens.net", + "myetherwalletconf.info", + "storrntoken.com", + "worldofbattles.io", + "ico.worldofbattles.io", + "privatix.live", + "riden.network", + "raidan.network", + "ralden.network", + "mymyetherwallet.com", + "myetherwallets.net", + "myetherwalletverify.info", + "stormxtoken.com", + "myethereum-wallet.com", + "myetherwallet-forkprep.pagedemo.co", + "myetnerwailet.com", + "www-mvetherwallet.com", + "etheirdelta.com", + "myetherwalletiu.com", + "myetherwaiiett.com", + "xn--mytherwalet-cbb87i.com", + "xn--myethrwallet-ivb.co", + "xn--myeterwallet-f1b.com", + "myehterwaliet.com", + "omegaone.co", + "myetherwaiietw.com", + "slack.com.ru", + "polkodot.network", + "request-network.net", + "requestnetwork.live", + "binancie.com", + "first-eth.info", + "myewerthwalliet.com", + "enjincoin.pw", + "xn--bitrex-k17b.com", + "alrswap.io", + "www-request.network", + "myetnenwallet.com", + "www-enigma.co", + "cryptoinsidenews.com", + "air-swap.tech", + "launch.airswap.cc", + "airswap.cc", + "airswaptoken.com", + "launch.airswap.in", + "airswap.in", + "security-steemit.com.mx", + "blockchalnwallet.com", + "blodkchainwallet.com", + "blodkchaln.com", + "myethereumwaiiet.com", + "myethereumwaliet.com", + "myethereumwalilet.com", + "myetherswailet.com", + "myetherswaliet.com", + "myetherswalilet.com", + "myetherwalilett.com", + "myetherwalletl.com", + "myetherwalletww.com", + "myethereunwallet.com", + "myethereumwallct.com", + "myetherwaiieti.com", + "myetherwaiiete.com", + "upfirng.com", + "paypie.net", + "paypie.tech", + "soam.co", + "myetherwaiict.com", + "numerai-token.com", + "www-bankera.com", + "vvanchain.org", + "omisegoairdrop.com", + "xn--enjncoin-41a.io", + "suncontract.su", + "myetherwaiietr.com", + "shapeshiff.io", + "warchain.org", + "myethwallett.com", + "myethervvaliet.com", + "wanchains.org", + "etherparty.in", + "enjincoin.me", + "etiam.io", + "invest.smartlands.tech", + "smartlands.tech", + "enijncoin.io", + "wanchain.network", + "nimiq.su", + "enjincoin.sale", + "tenxwallet.io", + "golem-network.net", + "myyethwallet.ml", + "mywetherwailiet.com", + "omg-omise.com", + "district0x.tech", + "centra-token.com", + "etherdetla.com", + "etnerparty.io", + "etherdelta.su", + "myetherwallett.neocities.org", + "myetherwallet-secure.com", + "myethereumwalletntw.info", + "real-markets.io", + "wallet-ethereum.org", + "request-network.com", + "shapeshifth.io", + "shiapeshift.in", + "coin.red-puise.com", + "ibittreix.com", + "coinkbase.com", + "cindicator.pro", + "myetherwallet.com.ailogin.me", + "eventchain.co", + "kinkik.in", + "myetherumwalletview.com", + "protostokenhub.com", + "coinrbase.com", + "myetherwalletlogin.com", + "omisegotoken.com", + "myethereumwalletntw.com", + "reall.markets", + "cobinhood.org", + "cobinhood.io", + "happy-coin.org", + "bitfinex.com.co", + "bitfienex.com", + "iconn.foundation", + "centra.vip", + "smartcontract.live", + "icon.community", + "air-token.com", + "centra.credit", + "myetherwallet-singin.com", + "smartcontractlink.com", + "shapesshift.io", + "0xtoken.io", + "augurproject.co", + "ethereumus.one", + "myetherumwalet.com", + "myetherwalletsignin.com", + "change-bank.org", + "charge-bank.com", + "myetherwalletsingin.com", + "myetherwalletcontract.com", + "change-bank.io", + "chainlink.tech", + "myetherwallet-confirm.com", + "tokensale.kybernet.network", + "kybernet.network", + "kyberr.network", + "kybernetwork.io", + "myetherwalletconfirm.com", + "kvnuke.github.io", + "kin.kikpro.co", + "myethereumwallet.co.uk", + "tokensale-kyber.network", + "kyber-network.co", + "tokensale.kyber-network.co", + "pyro0.github.io", + "tokensale.kyber.digital", + "kyber.digital", + "omise-go.me", + "my.etherwallet.com.de", + "bepartof.change-bank.co", + "change-bank.co", + "enigma-tokens.co", + "coinbase.com.eslogin.co", + "xn--bittrx-mva.com", + "ethrdelta.github.io", + "etherdellta.com", + "ico-nexus.social", + "red-pulse.tech", + "bitj0b.io", + "xn--bttrex-bwa.com", + "kin-klk.com", + "kin-crowdsale.com", + "ethedelta.com", + "coindash.su", + "myethwallet.co.uk", + "swarm.credit", + "myethereumwallet.uk", + "iconexu.social", + "wanchain.co", + "enigrna.co", + "linknetwork.co", + "qtum-token.com", + "omisego.com.co", + "rivetzintl.org", + "etherdelta.one", + "the-ether.pro", + "etherdelta.gitnub.io", + "kirkik.com", + "monetha.ltd", + "vlberate.io", + "ethereumwallet-kr.info", + "omise-go.org", + "iconexus.social", + "bittirrex.com", + "aventus.pro", + "atlant.solutions", + "aventus.group", + "metamak.io", + "omise.com.co", + "herotokens.io", + "starbase.pro", + "etherdelta.githulb.io", + "herotoken.co", + "kinico.net", + "dmarket.ltd", + "etherdelta.gilthub.io", + "golem-network.com", + "etnerscan.io", + "bllttriex.com", + "monetha.me", + "monetha.co", + "monetha-crowdsale.com", + "starbase.tech", + "aventus-crowdsale.com", + "shapeshift.pro", + "bllttrex.com", + "kickico.co", + "statustoken.im", + "bilttrex.com", + "tenxpay.io", + "bittrex.ltd", + "metalpay.im", + "aragon.im", + "coindash.tech", + "decentraland.tech", + "decentraland.pro", + "status-token.com", + "bittrex.cam", + "enigmatoken.com", + "unocoin.company", + "unocoin.fund", + "0xproject.io", + "0xtoken.com", + "numerai.tech", + "decentraiand.org", + "blockcrein.info", + "blockchealn.info", + "bllookchain.info", + "blockcbhain.info", + "myetherwallet.com.ethpromonodes.com", + "mettamask.io", + "tokenswap.org", + "netherum.com", + "etherexx.org", + "etherume.io", + "ethereum.plus", + "ehtereum.org", + "etereurm.org", + "etheream.com", + "ethererum.org", + "ethereum.io", + "etherdelta-glthub.com", + "cryptoalliance.herokuapp.com", + "bitspark2.com", + "indorsetoken.com", + "iconexus.tk", + "iconexus.ml", + "iconexus.ga", + "iconexus.cf", + "etherwallet.online", + "wallet-ethereum.net", + "bitsdigit.com", + "etherswap.org", + "eos.ac", + "uasfwallet.com", + "ziber.io", + "multiply-ethereum.info", + "bittrex.comze.com", + "karbon.vacau.com", + "etherdelta.gitlhub.io", + "etherdelta.glthub.io", + "digitaldevelopersfund.vacau.com", + "district-0x.io", + "coin-dash.com", + "coindash.ru", + "district0x.net", + "aragonproject.io", + "coin-wallet.info", + "coinswallet.info", + "contribute-status.im", + "ether-api.com", + "ether-wall.com", + "mycoinwallet.net", + "ethereumchamber.com", + "ethereumchamber.net", + "ethereumchest.com", + "ethewallet.com", + "myetherwallet.com.vc", + "myetherwallet.com.pe", + "myetherwallet.us.com", + "myetherwallet.com.u0387831.cp.regruhosting.ru", + "myethereumwallet.su", + "myetherweb.com.de", + "myetherieumwallet.com", + "myetehrwallet.com", + "myeterwalet.com", + "myetherwaiiet.com", + "myetherwallet.info", + "myetherwallet.ch", + "myetherwallet.om", + "myethervallet.com", + "myetherwallet.com.cm", + "myetherwallet.com.co", + "myetherwallet.com.de", + "myetherwallet.com.gl", + "myetherwallet.com.im", + "myetherwallet.com.ua", + "secure-myetherwallet.com", + "update-myetherwallet.com", + "wwwmyetherwallet.com", + "myeatherwallet.com", + "myetharwallet.com", + "myelherwallel.com", + "myetherwaillet.com", + "myetherwaliet.com", + "myetherwallel.com", + "myetherwallet.cam", + "myetherwallet.cc", + "myetherwallet.co", + "myetherwallet.cm", + "myetherwallet.cz", + "myetherwallet.org", + "myetherwallet.tech", + "myetherwallet.top", + "myetherwallet.net", + "myetherwallet.ru.com", + "myetherwallet.com.ru", + "metherwallet.com", + "myetrerwallet.com", + "myetlerwallet.com", + "myethterwallet.com", + "myethwallet.io", + "myethterwallet.co", + "myehterwallet.co", + "myaetherwallet.com", + "myetthterwallet.com", + "myetherwallet.one", + "myelterwallet.com", + "myetherwallet.gdn", + "myetherwallt.com", + "myeterwallet.com", + "myeteherwallet.com", + "myethearwailet.com", + "myetherwallelt.com", + "myetherwallett.com", + "etherwallet.org", + "myetherewallet.com", + "myeherwallet.com", + "myethcrwallet.com", + "myetherwallet.link", + "myetherwallets.com", + "myethearwaillet.com", + "myethearwallet.com", + "myetherawllet.com", + "myethereallet.com", + "myetherswallet.com", + "myetherwalet.com", + "myetherwaller.com", + "myetherwalliet.com", + "myetherwllet.com", + "etherwallet.io", + "myetherwallet.ca", + "myetherwallet.me", + "myetherwallet.ru", + "myetherwallet.xyz", + "myetherwallte.com", + "myethirwallet.com", + "myethrewallet.com", + "etherwallet.net", + "maetherwallet.com", + "meyetherwallet.com", + "my.ether-wallet.pw", + "myehterwallet.com", + "myeitherwallet.com", + "myelherwallet.com", + "myeltherwallet.com", + "myerherwallet.com", + "myethearwalet.com", + "myetherewalle.com", + "myethervvallet.com", + "myetherwallent.com", + "myetherwallet.fm", + "myetherwalllet.com", + "myetherwalltet.com", + "myetherwollet.com", + "myetlherwalet.com", + "myetlherwallet.com", + "rnyetherwallet.com", + "etherclassicwallet.com", + "omg-omise.co", + "omise-go.com", + "omise-go.net", + "omise-omg.com", + "omise-go.io", + "tenx-tech.com", + "bitclaive.com", + "tokensale-tenx.tech", + "ubiqcoin.org", + "metamask.com", + "ethtrade.io", + "myetcwallet.com", + "account-kigo.net", + "bitcoin-wallet.net", + "blocklichan.info", + "bloclkicihan.info", + "coindash.ml", + "eos-bonus.com", + "eos-io.info", + "ether-wallet.net", + "ethereum-wallet.info", + "ethereum-wallet.net", + "ethereumchest.net", + "reservations-kigo.net", + "reservations-lodgix.com", + "secure-liverez.com", + "secure-onerooftop.com", + "settings-liverez.com", + "software-liverez.com", + "software-lodgix.com", + "unhackableetherwallets.com", + "www-myetherwallet.com", + "etherwallet.co.za", + "etherwalletchain.com", + "etherwallets.net", + "etherwallets.nl", + "my-ethwallet.com", + "my.ether-wallet.co", + "myetherwallet.com.am", + "myetherwallet.com.ht", + "myetherwalletcom.com", + "myehterwailet.com", + "xn--myetherwalle-xoc.com", + "xn--myetherwalle-44i.com", + "xn--myetherwalle-xhk.com", + "xn--myetherwallt-cfb.com", + "xn--myetherwallt-6tb.com", + "xn--myetherwallt-xub.com", + "xn--myetherwallt-ovb.com", + "xn--myetherwallt-fwb.com", + "xn--myetherwallt-5wb.com", + "xn--myetherwallt-jzi.com", + "xn--myetherwallt-2ck.com", + "xn--myetherwallt-lok.com", + "xn--myetherwallt-lsl.com", + "xn--myetherwallt-ce6f.com", + "xn--myetherwalet-mcc.com", + "xn--myetherwalet-xhf.com", + "xn--myetherwalet-lcc.com", + "xn--myetherwaet-15ba.com", + "xn--myetherwalet-whf.com", + "xn--myetherwaet-v2ea.com", + "xn--myetherwllet-59a.com", + "xn--myetherwllet-jbb.com", + "xn--myetherwllet-wbb.com", + "xn--myetherwllet-9bb.com", + "xn--myetherwllet-ncb.com", + "xn--myetherwllet-0cb.com", + "xn--myetherwllet-5nb.com", + "xn--myetherwllet-ktd.com", + "xn--myetherwllet-mre.com", + "xn--myetherwllet-76e.com", + "xn--myetherwllet-o0l.com", + "xn--myetherwllet-c45f.com", + "xn--myetherallet-ejn.com", + "xn--myethewallet-4nf.com", + "xn--myethewallet-iof.com", + "xn--myethewallet-mpf.com", + "xn--myethewallet-6bk.com", + "xn--myethewallet-i31f.com", + "xn--myethrwallet-feb.com", + "xn--myethrwallt-fbbf.com", + "xn--myethrwallet-seb.com", + "xn--myethrwallt-rbbf.com", + "xn--myethrwallet-5eb.com", + "xn--myethrwallt-3bbf.com", + "xn--myethrwallet-0tb.com", + "xn--myethrwallt-tpbf.com", + "xn--myethrwallet-rub.com", + "xn--myethrwallt-iqbf.com", + "xn--myethrwallet-ivb.com", + "xn--myethrwallt-6qbf.com", + "xn--myethrwallet-8vb.com", + "xn--myethrwallt-vrbf.com", + "xn--myethrwallet-zwb.com", + "xn--myethrwallt-ksbf.com", + "xn--myethrwallet-dzi.com", + "xn--myethrwallt-wbif.com", + "xn--myethrwallet-wck.com", + "xn--myethrwallt-skjf.com", + "xn--myethrwallet-fok.com", + "xn--myethrwallt-fvjf.com", + "xn--myethrwallet-fsl.com", + "xn--myethrwallt-fwkf.com", + "xn--myethrwallet-5d6f.com", + "xn--myethrwallt-319ef.com", + "xn--myeterwallet-ufk.com", + "xn--myeterwallet-nrl.com", + "xn--myeterwallet-von.com", + "xn--myeterwallet-jl6c.com", + "xn--myeherwallet-ooc.com", + "xn--myeherwalle-6hci.com", + "xn--myeherwallet-v4i.com", + "xn--myeherwalle-zgii.com", + "xn--myeherwallet-ohk.com", + "xn--myeherwalle-6oji.com", + "xn--mytherwallet-ceb.com", + "xn--mythrwallet-cbbc.com", + "xn--mythrwallt-c7acf.com", + "xn--mytherwallet-peb.com", + "xn--mythrwallet-obbc.com", + "xn--mythrwallt-n7acf.com", + "xn--mytherwallet-2eb.com", + "xn--mythrwallet-0bbc.com", + "xn--mythrwallt-y7acf.com", + "xn--mytherwallet-xtb.com", + "xn--mythrwallet-qpbc.com", + "xn--mythrwallt-jlbcf.com", + "xn--mytherwallet-oub.com", + "xn--mythrwallet-fqbc.com", + "xn--mythrwallt-5lbcf.com", + "xn--mythrwallet-3qbc.com", + "xn--mythrwallt-smbcf.com", + "xn--mytherwallet-5vb.com", + "xn--mythrwallet-srbc.com", + "xn--mythrwallt-fnbcf.com", + "xn--mytherwallet-wwb.com", + "xn--mythrwallet-hsbc.com", + "xn--mythrwallt-1nbcf.com", + "xn--mytherwallet-9yi.com", + "xn--mythrwallet-tbic.com", + "xn--mythrwallt-dnhcf.com", + "xn--mytherwallet-tck.com", + "xn--mythrwallet-pkjc.com", + "xn--mythrwallt-lsicf.com", + "xn--mytherwallet-cok.com", + "xn--mythrwallet-cvjc.com", + "xn--mythrwallt-c2icf.com", + "xn--mytherwallet-csl.com", + "xn--mythrwallet-cwkc.com", + "xn--mythrwallt-c0jcf.com", + "xn--mytherwallet-2d6f.com", + "xn--mythrwallet-019ec.com", + "xn--mythrwallt-yq3ecf.com", + "xn--metherwallet-qlb.com", + "xn--metherwallet-1uf.com", + "xn--metherwallet-iyi.com", + "xn--metherwallet-zhk.com", + "xn--metherwallet-3ml.com", + "xn--mytherwallet-fvb.com", + "xn--myetherwallt-7db.com", + "xn--myetherwallt-leb.com", + "xn--myetherwallt-yeb.com", + "xn--yetherwallet-vjf.com", + "xn--yetherwallet-dfk.com", + "xn--yetherwallet-1t1f.com", + "xn--yetherwallet-634f.com", + "xn--myeherwallet-fpc.com", + "xn--myethewallt-crb.com", + "xn--metherwallet-1vc.com", + "xn--myeherwallt-kbb8039g.com", + "xn--myeherwallet-vk5f.com", + "xn--yethewallet-iw8ejl.com", + "xn--bittrx-th8b.com", + "xn--polniex-n0a.com", + "thekey.vin", + "thekey-vip.com", + "digitexftures.com", + "ethzero-wallet.org", + "zeepln.io", + "wepowers.network", + "wepower.vision" + ] +} diff --git a/test/stub/provider.js b/test/stub/provider.js index 85e1da707..e77db4e28 100644 --- a/test/stub/provider.js +++ b/test/stub/provider.js @@ -1,12 +1,12 @@ const JsonRpcEngine = require('json-rpc-engine') const scaffoldMiddleware = require('eth-json-rpc-middleware/scaffold') +const TestBlockchain = require('eth-block-tracker/test/util/testBlockMiddleware') module.exports = { createEngineForTestData, providerFromEngine, scaffoldMiddleware, - createEthJsQueryStub, - createStubedProvider, + createTestProviderTools, } @@ -19,20 +19,13 @@ function providerFromEngine (engine) { return provider } -function createEthJsQueryStub (stubProvider) { - return new Proxy({}, { - get: (obj, method) => { - return (...params) => { - return new Promise((resolve, reject) => { - stubProvider.sendAsync({ method: `eth_${method}`, params }, (err, ress) => resolve(ress.result)) - }) - } - }, - }) -} - -function createStubedProvider (resultStub) { +function createTestProviderTools (opts = {}) { const engine = createEngineForTestData() - engine.push(scaffoldMiddleware(resultStub)) - return providerFromEngine(engine) -}
\ No newline at end of file + const testBlockchain = new TestBlockchain() + // handle provided hooks + engine.push(scaffoldMiddleware(opts.scaffold || {})) + // handle block tracker methods + engine.push(testBlockchain.createMiddleware()) + const provider = providerFromEngine(engine) + return { provider, engine, testBlockchain } +} diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js index ea6dfda6a..b6a691860 100644 --- a/test/unit/actions/tx_test.js +++ b/test/unit/actions/tx_test.js @@ -51,9 +51,8 @@ describe('tx confirmation screen', function () { actions.cancelTx({value: firstTxId})((action) => { result = reducers(initialState, action) - done() }) - + done() }) it('should transition to the account detail view', function () { diff --git a/test/unit/blacklist-controller-test.js b/test/unit/blacklist-controller-test.js index a9260466f..cbf73d3e5 100644 --- a/test/unit/blacklist-controller-test.js +++ b/test/unit/blacklist-controller-test.js @@ -38,4 +38,4 @@ describe('blacklist controller', function () { assert.equal(result, false) }) }) -})
\ No newline at end of file +}) diff --git a/test/unit/components/balance-component-test.js b/test/unit/components/balance-component-test.js new file mode 100644 index 000000000..9b1e82acf --- /dev/null +++ b/test/unit/components/balance-component-test.js @@ -0,0 +1,45 @@ +const assert = require('assert') +const h = require('react-hyperscript') +const { createMockStore } = require('redux-test-utils') +const { shallowWithStore } = require('../../lib/shallow-with-store') +const BalanceComponent = require('../../../ui/app/components/balance-component') +const mockState = { + metamask: { + accounts: { abc: {} }, + network: 1, + selectedAddress: 'abc', + } +} + +describe('BalanceComponent', function () { + let balanceComponent + let store + let component + beforeEach(function () { + store = createMockStore(mockState) + component = shallowWithStore(h(BalanceComponent), store) + balanceComponent = component.dive() + }) + + it('shows token balance and convert to fiat value based on conversion rate', function () { + const formattedBalance = '1.23 ETH' + + const tokenBalance = balanceComponent.instance().getTokenBalance(formattedBalance, false) + const fiatDisplayNumber = balanceComponent.instance().getFiatDisplayNumber(formattedBalance, 2) + + assert.equal('1.23 ETH', tokenBalance) + assert.equal(2.46, fiatDisplayNumber) + }) + + it('shows only the token balance when conversion rate is not available', function () { + const formattedBalance = '1.23 ETH' + + const tokenBalance = balanceComponent.instance().getTokenBalance(formattedBalance, false) + const fiatDisplayNumber = balanceComponent.instance().getFiatDisplayNumber(formattedBalance, 0) + + assert.equal('1.23 ETH', tokenBalance) + assert.equal('N/A', fiatDisplayNumber) + }) + +}) + diff --git a/test/unit/components/pending-tx-test.js b/test/unit/components/pending-tx-test.js index 20feba2a3..c6c588e1c 100644 --- a/test/unit/components/pending-tx-test.js +++ b/test/unit/components/pending-tx-test.js @@ -1,18 +1,22 @@ const assert = require('assert') -const additions = require('react-testutils-additions') const h = require('react-hyperscript') const PendingTx = require('../../../ui/app/components/pending-tx') -const ReactTestUtils = require('react-addons-test-utils') const ethUtil = require('ethereumjs-util') -describe('PendingTx', function () { - const identities = { - '0xfdea65c8e26263f6d9a1b5de9555d2931a33b826': { - name: 'Main Account 1', - balance: '0x00000000000000056bc75e2d63100000', - }, +const { createMockStore } = require('redux-test-utils') +const { shallowWithStore } = require('../../lib/shallow-with-store') + +const identities = { abc: {}, def: {} } +const mockState = { + metamask: { + accounts: { abc: {} }, + identities, + conversionRate: 10, + selectedAddress: 'abc', } +} +describe('PendingTx', function () { const gasPrice = '0x4A817C800' // 20 Gwei const txData = { 'id': 5021615666270214, @@ -29,55 +33,35 @@ describe('PendingTx', function () { 'gasLimitSpecified': false, 'estimatedGas': '0x5208', } + const newGasPrice = '0x77359400' + const computedBalances = {} + computedBalances[Object.keys(identities)[0]] = { + ethBalance: '0x00000000000000056bc75e2d63100000', + } + const props = { + txData, + computedBalances, + sendTransaction: (txMeta, event) => { + // Assert changes: + const result = ethUtil.addHexPrefix(txMeta.txParams.gasPrice) + assert.notEqual(result, gasPrice, 'gas price should change') + assert.equal(result, newGasPrice, 'gas price assigned.') + }, + } - it('should use updated values when edited.', function (done) { - const renderer = ReactTestUtils.createRenderer() - const newGasPrice = '0x77359400' - - const computedBalances = {} - computedBalances[Object.keys(identities)[0]] = { - ethBalance: '0x00000000000000056bc75e2d63100000', - } - const props = { - identities, - accounts: identities, - txData, - computedBalances, - sendTransaction: (txMeta, event) => { - // Assert changes: - const result = ethUtil.addHexPrefix(txMeta.txParams.gasPrice) - assert.notEqual(result, gasPrice, 'gas price should change') - assert.equal(result, newGasPrice, 'gas price assigned.') - done() - }, - } - - const pendingTxComponent = h(PendingTx, props) - const component = additions.renderIntoDocument(pendingTxComponent) - renderer.render(pendingTxComponent) - const result = renderer.getRenderOutput() - assert.equal(result.type, 'div', 'should create a div') - - try { - const input = additions.find(component, '.cell.row input[type="number"]')[1] - ReactTestUtils.Simulate.change(input, { - target: { - value: 2, - checkValidity () { return true }, - }, - }) + let pendingTxComponent + let store + let component + beforeEach(function () { + store = createMockStore(mockState) + component = shallowWithStore(h(PendingTx, props), store) + pendingTxComponent = component + }) - const form = additions.find(component, 'form')[0] - form.checkValidity = () => true - form.getFormEl = () => { return { checkValidity () { return true } } } - ReactTestUtils.Simulate.submit(form, { preventDefault () {}, target: { checkValidity () { - return true - } } }) - } catch (e) { - console.log('WHAAAA') - console.error(e) - } + it('should render correctly', function (done) { + assert.equal(pendingTxComponent.props().identities, identities) + done() }) }) diff --git a/test/unit/development/sample-changelog.md b/test/unit/development/sample-changelog.md new file mode 100644 index 000000000..8fc9d2145 --- /dev/null +++ b/test/unit/development/sample-changelog.md @@ -0,0 +1,914 @@ +# Changelog + +## Current Master + +## 4.1.3 2018-2-28 + +- Ensure MetaMask's inpage provider is named MetamaskInpageProvider to keep some sites from breaking. +- Add retry transaction button back into classic ui. + +## 4.1.2 2018-2-28 + +- Actually includes all the fixes mentioned in 4.1.1 (sorry) + +## 4.1.1 2018-2-28 + +- Fix "Add Token" screen referencing missing token logo urls +- Prevent user from switching network during signature request +- Fix misleading language "Contract Published" -> "Contract Deployment" +- Fix cancel button on "Buy Eth" screen +- Improve new-ui onboarding flow style + +## 4.1.0 2018-2-27 + +- Report failed txs to Sentry with more specific message +- Fix internal feature flags being sometimes undefined +- Standardized license to MIT + +## 4.0.0 2018-2-22 + +- Introduce new MetaMask user interface. + +## 3.14.2 2018-2-15 + +- Fix bug where log subscriptions would break when switching network. +- Fix bug where storage values were cached across blocks. +- Add MetaMask light client [testing container](https://github.com/MetaMask/mesh-testing) + +## 3.14.1 2018-2-1 + +- Further fix scrolling for Firefox. + +## 3.14.0 2018-2-1 + +- Removed unneeded data from storage +- Add a "reset account" feature to Settings +- Add warning for importing some kinds of files. +- Scrollable Setting view for Firefox. + +## 3.13.8 2018-1-29 + +- Fix provider for Kovan network. +- Bump limit for EventEmitter listeners before warning. +- Display Error when empty string is entered as a token address. + +## 3.13.7 2018-1-22 + +- Add ability to bypass gas estimation loading indicator. +- Forward failed transactions to Sentry error reporting service +- Re-add changes from 3.13.5 + +## 3.13.6 2017-1-18 + +- Roll back changes to 3.13.4 to fix some issues with the new Infura REST provider. + +## 3.13.5 2018-1-16 + +- Estimating gas limit for simple ether sends now faster & cheaper, by avoiding VM usage on recipients with no code. +- Add an extra px to address for Firefox clipping. +- Fix Firefox scrollbar. +- Open metamask popup for transaction confirmation before gas estimation finishes and add a loading screen over transaction confirmation. +- Fix bug that prevented eth_signTypedData from signing bytes. +- Further improve gas price estimation. + +## 3.13.4 2018-1-9 + +- Remove recipient field if application initializes a tx with an empty string, or 0x, and tx data. Throw an error with the same condition, but without tx data. +- Improve gas price suggestion to be closer to the lowest that will be accepted. +- Throw an error if a application tries to submit a tx whose value is a decimal, and inform that it should be in wei. +- Fix bug that prevented updating custom token details. +- No longer mark long-pending transactions as failed, since we now have button to retry with higher gas. +- Fix rounding error when specifying an ether amount that has too much precision. +- Fix bug where incorrectly inputting seed phrase would prevent any future attempts from succeeding. + +## 3.13.3 2017-12-14 + +- Show tokens that are held that have no balance. +- Reduce load on Infura by using a new block polling endpoint. + +## 3.13.2 2017-12-9 + +- Reduce new block polling interval to 8000 ms, to ease server load. + +## 3.13.1 2017-12-7 + +- Allow Dapps to specify a transaction nonce, allowing dapps to propose resubmit and force-cancel transactions. + +## 3.13.0 2017-12-7 + +- Allow resubmitting transactions that are taking long to complete. + +## 3.12.1 2017-11-29 + +- Fix bug where a user could be shown two different seed phrases. +- Detect when multiple web3 extensions are active, and provide useful error. +- Adds notice about seed phrase backup. + +## 3.12.0 2017-10-25 + +- Add support for alternative ENS TLDs (Ethereum Name Service Top-Level Domains). +- Lower minimum gas price to 0.1 GWEI. +- Remove web3 injection message from production (thanks to @ChainsawBaby) +- Add additional debugging info to our state logs, specifically OS version and browser version. + +## 3.11.2 2017-10-21 + +- Fix bug where reject button would sometimes not work. +- Fixed bug where sometimes MetaMask's connection to a page would be unreliable. + +## 3.11.1 2017-10-20 + +- Fix bug where log filters were not populated correctly +- Fix bug where web3 API was sometimes injected after the page loaded. +- Fix bug where first account was sometimes not selected correctly after creating or restoring a vault. +- Fix bug where imported accounts could not use new eth_signTypedData method. + +## 3.11.0 2017-10-11 + +- Add support for new eth_signTypedData method per EIP 712. +- Fix bug where some transactions would be shown as pending forever, even after successfully mined. +- Fix bug where a transaction might be shown as pending forever if another tx with the same nonce was mined. +- Fix link to support article on token addresses. + +## 3.10.9 2017-10-5 + +- Only rebrodcast transactions for a day not a days worth of blocks +- Remove Slack link from info page, since it is a big phishing target. +- Stop computing balance based on pending transactions, to avoid edge case where users are unable to send transactions. + +## 3.10.8 2017-9-28 + +- Fixed usage of new currency fetching API. + +## 3.10.7 2017-9-28 + +- Fixed bug where sometimes the current account was not correctly set and exposed to web apps. +- Added AUD, HKD, SGD, IDR, PHP to currency conversion list + +## 3.10.6 2017-9-27 + +- Fix bug where newly created accounts were not selected. +- Fix bug where selected account was not persisted between lockings. + +## 3.10.5 2017-9-27 + +- Fix block gas limit estimation. + +## 3.10.4 2017-9-27 + +- Fix bug that could mis-render token balances when very small. (Not actually included in 3.9.9) +- Fix memory leak warning. +- Fix bug where new event filters would not include historical events. + +## 3.10.3 2017-9-21 + +- Fix bug where metamask-dapp connections are lost on rpc error +- Fix bug that would sometimes display transactions as failed that could be successfully mined. + +## 3.10.2 2017-9-18 + +rollback to 3.10.0 due to bug + +## 3.10.1 2017-9-18 + +- Add ability to export private keys as a file. +- Add ability to export seed words as a file. +- Changed state logs to a file download than a clipboard copy. +- Add specific error for failed recipient address checksum. +- Fixed a long standing memory leak associated with filters installed by dapps +- Fix link to support center. +- Fixed tooltip icon locations to avoid overflow. +- Warn users when a dapp proposes a high gas limit (90% of blockGasLimit or higher +- Sort currencies by currency name (thanks to strelok1: https://github.com/strelok1). + +## 3.10.0 2017-9-11 + +- Readded loose keyring label back into the account list. +- Remove cryptonator from chrome permissions. +- Add info on token contract addresses. +- Add validation preventing users from inputting their own addresses as token tracking addresses. +- Added button to reject all transactions (thanks to davidp94! https://github.com/davidp94) + + +## 3.9.13 2017-9-8 + +- Changed the way we initialize the inpage provider to fix a bug affecting some developers. + +## 3.9.12 2017-9-6 + +- Fix bug that prevented Web3 1.0 compatibility +- Make eth_sign deprecation warning less noisy +- Add useful link to eth_sign deprecation warning. +- Fix bug with network version serialization over synchronous RPC +- Add MetaMask version to state logs. +- Add the total amount of tokens when multiple tokens are added under the token list +- Use HTTPS links for Etherscan. +- Update Support center link to new one with HTTPS. +- Make web3 deprecation notice more useful by linking to a descriptive article. + +## 3.9.11 2017-8-24 + +- Fix nonce calculation bug that would sometimes generate very wrong nonces. +- Give up resubmitting a transaction after 3500 blocks. + +## 3.9.10 2017-8-23 + +- Improve nonce calculation, to prevent bug where people are unable to send transactions reliably. +- Remove link to eth-tx-viz from identicons in tx history. + +## 3.9.9 2017-8-18 + +- Fix bug where some transaction submission errors would show an empty screen. +- Fix bug that could mis-render token balances when very small. +- Fix formatting of eth_sign "Sign Message" view. +- Add deprecation warning to eth_sign "Sign Message" view. + +## 3.9.8 2017-8-16 + +- Reenable token list. +- Remove default tokens. + +## 3.9.7 2017-8-15 + +- hotfix - disable token list +- Added a deprecation warning for web3 https://github.com/ethereum/mist/releases/tag/v0.9.0 + +## 3.9.6 2017-8-09 + +- Replace account screen with an account drop-down menu. +- Replace account buttons with a new account-specific drop-down menu. + +## 3.9.5 2017-8-04 + +- Improved phishing detection configuration update rate + +## 3.9.4 2017-8-03 + +- Fixed bug that prevented transactions from being rejected. + +## 3.9.3 2017-8-03 + +- Add support for EGO ujo token +- Continuously update blacklist for known phishing sites in background. +- Automatically detect suspicious URLs too similar to common phishing targets, and blacklist them. + +## 3.9.2 2017-7-26 + +- Fix bugs that could sometimes result in failed transactions after switching networks. +- Include stack traces in txMeta's to better understand the life cycle of transactions +- Enhance blacklister functionality to include levenshtein logic. (credit to @sogoiii and @409H for their help!) + +## 3.9.1 2017-7-19 + +- No longer automatically request 1 ropsten ether for the first account in a new vault. +- Now redirects from known malicious sites faster. +- Added a link to our new support page to the help screen. +- Fixed bug where a new transaction would be shown over the current transaction, creating a possible timing attack against user confirmation. +- Fixed bug in nonce tracker where an incorrect nonce would be calculated. +- Lowered minimum gas price to 1 Gwei. + +## 3.9.0 2017-7-12 + +- Now detects and blocks known phishing sites. + +## 3.8.6 2017-7-11 + +- Make transaction resubmission more resilient. +- No longer validate nonce client-side in retry loop. +- Fix bug where insufficient balance error was sometimes shown on successful transactions. + +## 3.8.5 2017-7-7 + +- Fix transaction resubmit logic to fail slightly less eagerly. + +## 3.8.4 2017-7-7 + +- Improve transaction resubmit logic to fail more eagerly when a user would expect it to. + +## 3.8.3 2017-7-6 + +- Re-enable default token list. +- Add origin header to dapp-bound requests to allow providers to throttle sites. +- Fix bug that could sometimes resubmit a transaction that had been stalled due to low balance after balance was restored. + +## 3.8.2 2017-7-3 + +- No longer show network loading indication on config screen, to allow selecting custom RPCs. +- Visually indicate that network spinner is a menu. +- Indicate what network is being searched for when disconnected. + +## 3.8.1 2017-6-30 + +- Temporarily disabled loading popular tokens by default to improve performance. +- Remove SEND token button until a better token sending form can be built, due to some precision issues. +- Fix precision bug in token balances. +- Cache token symbol and precisions to reduce network load. +- Transpile some newer JavaScript, restores compatibility with some older browsers. + +## 3.8.0 2017-6-28 + +- No longer stop rebroadcasting transactions +- Add list of popular tokens held to the account detail view. +- Add ability to add Tokens to token list. +- Add a warning to JSON file import. +- Add "send" link to token list, which goes to TokenFactory. +- Fix bug where slowly mined txs would sometimes be incorrectly marked as failed. +- Fix bug where badge count did not reflect personal_sign pending messages. +- Seed word confirmation wording is now scarier. +- Fix error for invalid seed words. +- Prevent users from submitting two duplicate transactions by disabling submit. +- Allow Dapps to specify gas price as hex string. +- Add button for copying state logs to clipboard. + +## 3.7.8 2017-6-12 + +- Add an `ethereum:` prefix to the QR code address +- The default network on installation is now MainNet +- Fix currency API URL from cryptonator. +- Update gasLimit params with every new block seen. +- Fix ENS resolver symbol UI. + +## 3.7.7 2017-6-8 + +- Fix bug where metamask would show old data after computer being asleep or disconnected from the internet. + +## 3.7.6 2017-6-5 + +- Fix bug that prevented publishing contracts. + +## 3.7.5 2017-6-5 + +- Prevent users from sending to the `0x0` address. +- Provide useful errors when entering bad characters in ENS name. +- Add ability to copy addresses from transaction confirmation view. + +## 3.7.4 2017-6-2 + +- Fix bug with inflight cache that caused some block lookups to return bad values (affected OasisDex). +- Fixed bug with gas limit calculation that would sometimes create unsubmittable gas limits. + +## 3.7.3 2017-6-1 + +- Rebuilt to fix cache clearing bug. + +## 3.7.2 2017-5-31 + +- Now when switching networks sites that use web3 will reload +- Now when switching networks the extension does not restart +- Cleanup decimal bugs in our gas inputs. +- Fix bug where submit button was enabled for invalid gas inputs. +- Now enforce 95% of block's gasLimit to protect users. +- Removing provider-engine from the inpage provider. This fixes some error handling inconsistencies introduced in 3.7.0. +- Added "inflight cache", which prevents identical requests from clogging up the network, dramatically improving ENS performance. +- Fixed bug where filter subscriptions would sometimes fail to unsubscribe. +- Some contracts will now display logos instead of jazzicons. +- Some contracts will now have names displayed in the confirmation view. + +## 3.7.0 2017-5-23 + +- Add Transaction Number (nonce) to transaction list. +- Label the pending tx icon with a tooltip. +- Fix bug where website filters would pile up and not deallocate when leaving a site. +- Continually resubmit pending txs for a period of time to ensure successful broadcast. +- ENS names will no longer resolve to their owner if no resolver is set. Resolvers must be explicitly set and configured. + +## 3.6.5 2017-5-17 + +- Fix bug where edited gas parameters would not take effect. +- Trim currency list. +- Enable decimals in our gas prices. +- Fix reset button. +- Fix event filter bug introduced by newer versions of Geth. +- Fix bug where decimals in gas inputs could result in strange values. + +## 3.6.4 2017-5-8 + +- Fix main-net ENS resolution. + +## 3.6.3 2017-5-8 + +- Fix bug that could stop newer versions of Geth from working with MetaMask. + +## 3.6.2 2017-5-8 + +- Input gas price in Gwei. +- Enforce Safe Gas Minimum recommended by EthGasStation. +- Fix bug where block-tracker could stop polling for new blocks. +- Reduce UI size by removing internal web3. +- Fix bug where gas parameters would not properly update on adjustment. + +## 3.6.1 2017-4-30 + +- Made fox less nosy. +- Fix bug where error was reported in debugger console when Chrome opened a new window. + +## 3.6.0 2017-4-26 + +- Add Rinkeby Test Network to our network list. + +## 3.5.4 2017-4-25 + +- Fix occasional nonce tracking issue. +- Fix bug where some events would not be emitted by web3. +- Fix bug where an error would be thrown when composing signatures for networks with large ID values. + +## 3.5.3 2017-4-24 + +- Popup new transactions in Firefox. +- Fix transition issue from account detail screen. +- Revise buy screen for more modularity. +- Fixed some other small bugs. + +## 3.5.2 2017-3-28 + +- Fix bug where gas estimate totals were sometimes wrong. +- Add link to Kovan Test Faucet instructions on buy view. +- Inject web3 into loaded iFrames. + +## 3.5.1 2017-3-27 + +- Fix edge case where users were unable to enable the notice button if notices were short enough to not require a scrollbar. + +## 3.5.0 2017-3-27 + +- Add better error messages for when a transaction fails on approval +- Allow sending to ENS names in send form on Ropsten. +- Added an address book functionality that remembers the last 15 unique addresses sent to. +- Can now change network to custom RPC URL from lock screen. +- Removed support for old, lightwallet based vault. Users who have not opened app in over a month will need to recover with their seed phrase. This will allow Firefox support sooner. +- Fixed bug where spinner wouldn't disappear on incorrect password submission on seed word reveal. +- Polish the private key UI. +- Enforce minimum values for gas price and gas limit. +- Fix bug where total gas was sometimes not live-updated. +- Fix bug where editing gas value could have some abrupt behaviors (#1233) +- Add Kovan as an option on our network list. +- Fixed bug where transactions on other networks would disappear when submitting a transaction on another network. + +## 3.4.0 2017-3-8 + +- Add two most recently used custom RPCs to network dropdown menu. +- Add personal_sign method support. +- Add personal_ecRecover method support. +- Add ability to customize gas and gasPrice on the transaction approval screen. +- Increase default gas buffer to 1.5x estimated gas value. + +## 3.3.0 2017-2-20 + +- net_version has been made synchronous. +- Test suite for migrations expanded. +- Network now changeable from lock screen. +- Improve test coverage of eth.sign behavior, including a code example of verifying a signature. + +## 3.2.2 2017-2-8 + +- Revert eth.sign behavior to the previous one with a big warning. We will be gradually implementing the new behavior over the coming time. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + +- Improve test coverage of eth.sign behavior, including a code example of verifying a signature. + +## 3.2.2 2017-2-8 + +- Revert eth.sign behavior to the previous one with a big warning. We will be gradually implementing the new behavior over the coming time. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + +## 3.2.1 2017-2-8 + +- Revert back to old style message signing. +- Fixed some build errors that were causing a variety of bugs. + +## 3.2.0 2017-2-8 + +- Add ability to import accounts in JSON file format (used by Mist, Geth, MyEtherWallet, and more!) +- Fix unapproved messages not being included in extension badge. +- Fix rendering bug where the Confirm transaction view would let you approve transactions when the account has insufficient balance. + +## 3.1.2 2017-1-24 + +- Fix "New Account" default keychain + +## 3.1.1 2017-1-20 + +- Fix HD wallet seed export + +## 3.1.0 2017-1-18 + +- Add ability to import accounts by private key. +- Fixed bug that returned the wrong transaction hashes on private networks that had not implemented EIP 155 replay protection (like TestRPC). + +## 3.0.1 2017-1-17 + +- Fixed bug that prevented eth.sign from working. +- Fix the displaying of transactions that have been submitted to the network in Transaction History + +## 3.0.0 2017-1-16 + +- Fix seed word account generation (https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.t4i1qmmsz). +- Fix Bug where you see an empty transaction flash by on the confirm transaction view. +- Create visible difference in transaction history between an approved but not yet included in a block transaction and a transaction who has been confirmed. +- Fix memory leak in RPC Cache +- Override RPC commands eth_syncing and web3_clientVersion +- Remove certain non-essential permissions from certain builds. +- Add a check for when a tx is included in a block. +- Fix bug where browser-solidity would sometimes warn of a contract creation error when there was none. +- Minor modifications to network display. +- Network now displays properly for pending transactions. +- Implement replay attack protections allowed by EIP 155. +- Fix bug where sometimes loading account data would fail by querying a future block. + +## 2.14.1 2016-12-20 + +- Update Coinbase info. and increase the buy amount to $15 +- Fixed ropsten transaction links +- Temporarily disable extension reload detection causing infinite reload bug. +- Implemented basic checking for valid RPC URIs. + +## 2.14.0 2016-12-16 + +- Removed Morden testnet provider from provider menu. +- Add support for notices. +- Fix broken reload detection. +- Fix transaction forever cached-as-pending bug. + +## 2.13.11 2016-11-23 + +- Add support for synchronous RPC method "eth_uninstallFilter". +- Forgotten password prompts now send users directly to seed word restoration. + +## 2.13.10 2016-11-22 + +- Improve gas calculation logic. +- Default to Dapp-specified gas limits for transactions. +- Ropsten networks now properly point to the faucet when attempting to buy ether. +- Ropsten transactions now link to etherscan correctly. + +## 2.13.9 2016-11-21 + +- Add support for the new, default Ropsten Test Network. +- Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests. +- Fix bug that would cause the Custom RPC menu item to not appear when Localhost 8545 was selected. +- Point ropsten faucet button to actual faucet. +- Phase out ethereumjs-util from our encryptor module. + +## 2.13.8 2016-11-16 + +- Show a warning when a transaction fails during simulation. +- Fix bug where 20% of gas estimate was not being added properly. +- Render error messages in confirmation screen more gracefully. + +## 2.13.7 2016-11-8 + +- Fix bug where gas estimate would sometimes be very high. +- Increased our gas estimate from 100k gas to 20% of estimate. +- Fix GitHub link on info page to point at current repository. + +## 2.13.6 2016-10-26 + +- Add a check for improper Transaction data. +- Inject up to date version of web3.js +- Now nicknaming new accounts "Account #" instead of "Wallet #" for clarity. +- Fix bug where custom provider selection could show duplicate items. +- Fix bug where connecting to a local morden node would make two providers appear selected. +- Fix bug that was sometimes preventing transactions from being sent. + +## 2.13.5 2016-10-18 + +- Increase default max gas to `100000` over the RPC's `estimateGas` response. +- Fix bug where slow-loading dapps would sometimes trigger infinite reload loops. + +## 2.13.4 2016-10-17 + +- Add custom transaction fee field to send form. +- Fix bug where web3 was being injected into XML files. +- Fix bug where changing network would not reload current Dapps. + +## 2.13.3 2016-10-4 + +- Fix bug where log queries were filtered out. +- Decreased vault confirmation button font size to help some Linux users who could not see it. +- Made popup a little taller because it would sometimes cut off buttons. +- Fix bug where long account lists would get scrunched instead of scrolling. +- Add legal information to relevant pages. +- Rename UI elements to be more consistent with one another. +- Updated Terms of Service and Usage. +- Prompt users to re-agree to the Terms of Service when they are updated. + +## 2.13.2 2016-10-4 + +- Fix bug where chosen FIAT exchange rate does no persist when switching networks +- Fix additional parameters that made MetaMask sometimes receive errors from Parity. +- Fix bug where invalid transactions would still open the MetaMask popup. +- Removed hex prefix from private key export, to increase compatibility with Geth, MyEtherWallet, and Jaxx. + +## 2.13.1 2016-09-23 + +- Fix a bug with estimating gas on Parity +- Show loading indication when selecting ShapeShift as purchasing method. + +## 2.13.0 2016-09-18 + +- Add Parity compatibility, fixing Geth dependency issues. +- Add a link to the transaction in history that goes to https://metamask.github.io/eth-tx-viz +too help visualize transactions and to where they are going. +- Show "Buy Ether" button and warning on tx confirmation when sender balance is insufficient + +## 2.12.1 2016-09-14 + +- Fixed bug where if you send a transaction from within MetaMask extension the +popup notification opens up. +- Fixed bug where some tx errors would block subsequent txs until the plugin was refreshed. + +## 2.12.0 2016-09-14 + +- Add a QR button to the Account detail screen +- Fixed bug where opening MetaMask could close a non-metamask popup. +- Fixed memory leak that caused occasional crashes. + +## 2.11.1 2016-09-12 + +- Fix bug that prevented caches from being cleared in Opera. + +## 2.11.0 2016-09-12 + +- Fix bug where pending transactions from Test net (or other networks) show up In Main net. +- Add fiat conversion values to more views. +- On fresh install, open a new tab with the MetaMask Introduction video. Does not open on update. +- Block negative values from transactions. +- Fixed a memory leak. +- MetaMask logo now renders as super lightweight SVG, improving compatibility and performance. +- Now showing loading indication during vault unlocking, to clarify behavior for users who are experiencing slow unlocks. +- Now only initially creates one wallet when restoring a vault, to reduce some users' confusion. + +## 2.10.2 2016-09-02 + +- Fix bug where notification popup would not display. + +## 2.10.1 2016-09-02 + +- Fix bug where provider menu did not allow switching to custom network from a custom network. +- Sending a transaction from within MetaMask no longer triggers a popup. +- The ability to build without livereload features (such as for production) can be enabled with the gulp --disableLiveReload flag. +- Fix Ethereum JSON RPC Filters bug. + +## 2.10.0 2016-08-29 + +- Changed transaction approval from notifications system to popup system. +- Add a back button to locked screen to allow restoring vault from seed words when password is forgotten. +- Forms now retain their values even when closing the popup and reopening it. +- Fixed a spelling error in provider menu. + +## 2.9.2 2016-08-24 + +- Fixed shortcut bug from preventing installation. + +## 2.9.1 2016-08-24 + +- Added static image as fallback for when WebGL isn't supported. +- Transaction history now has a hard limit. +- Added info link on account screen that visits Etherscan. +- Fixed bug where a message signing request would be lost if the vault was locked. +- Added shortcut to open MetaMask (Ctrl+Alt+M or Cmd+Opt/Alt+M) +- Prevent API calls in tests. +- Fixed bug where sign message confirmation would sometimes render blank. + +## 2.9.0 2016-08-22 + +- Added ShapeShift to the transaction history +- Added affiliate key to Shapeshift requests +- Added feature to reflect current conversion rates of current vault balance. +- Modify balance display logic. + +## 2.8.0 2016-08-15 + +- Integrate ShapeShift +- Add a form for Coinbase to specify amount to buy +- Fix various typos. +- Make dapp-metamask connection more reliable +- Remove Ethereum Classic from provider menu. + +## 2.7.3 2016-07-29 + +- Fix bug where changing an account would not update in a live Dapp. + +## 2.7.2 2016-07-29 + +- Add Ethereum Classic to provider menu +- Fix bug where host store would fail to receive updates. + +## 2.7.1 2016-07-27 + +- Fix bug where web3 would sometimes not be injected in time for the application. +- Fixed bug where sometimes when opening the plugin, it would not fully open until closing and re-opening. +- Got most functionality working within Firefox (still working on review process before it can be available). +- Fixed menu dropdown bug introduced in Chrome 52. + +## 2.7.0 2016-07-21 + +- Added a Warning screen about storing ETH +- Add buy Button! +- MetaMask now throws descriptive errors when apps try to use synchronous web3 methods. +- Removed firefox-specific line in manifest. + +## 2.6.2 2016-07-20 + +- Fixed bug that would prevent the plugin from reopening on the first try after receiving a new transaction while locked. +- Fixed bug that would render 0 ETH as a non-exact amount. + +## 2.6.1 2016-07-13 + +- Fix tool tips on Eth balance to show the 6 decimals +- Fix rendering of recipient SVG in tx approval notification. +- New vaults now generate only one wallet instead of three. +- Bumped version of web3 provider engine. +- Fixed bug where some lowercase or uppercase addresses were not being recognized as valid. +- Fixed bug where gas cost was misestimated on the tx confirmation view. + +## 2.6.0 2016-07-11 + +- Fix formatting of ETH balance +- Fix formatting of account details. +- Use web3 minified dist for faster inject times +- Fix issue where dropdowns were not in front of icons. +- Update transaction approval styles. +- Align failed and successful transaction history text. +- Fix issue where large domain names and large transaction values would misalign the transaction history. +- Abbreviate ether balances on transaction details to maintain formatting. +- General code cleanup. + +## 2.5.0 2016-06-29 + +- Implement new account design. +- Added a network indicator mark in dropdown menu +- Added network name next to network indicator +- Add copy transaction hash button to completed transaction list items. +- Unify wording for transaction approve/reject options on notifications and the extension. +- Fix bug where confirmation view would be shown twice. + +## 2.4.5 2016-06-29 + +- Fixed bug where MetaMask interfered with PDF loading. +- Moved switch account icon into menu bar. +- Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions. +- Now enforce 20 character limit on wallet names. +- Wallet titles are now properly truncated in transaction confirmation. +- Fix formatting on terms & conditions page. +- Now enforce 30 character limit on wallet names. +- Fix out-of-place positioning of pending transaction badges on wallet list. +- Change network status icons to reflect current design. + +## 2.4.4 2016-06-23 + +- Update web3-stream-provider for batch payload bug fix + +## 2.4.3 2016-06-23 + +- Remove redundant network option buttons from settings page +- Switch out font family Transat for Montserrat + +## 2.4.2 2016-06-22 + +- Change out export icon for key. +- Unify copy to clipboard icon +- Fixed eth.sign behavior. +- Fix behavior of batched outbound transactions. + +## 2.4.0 2016-06-20 + +- Clean up UI. +- Remove nonfunctional QR code button. +- Make network loading indicator clickable to select accessible network. +- Show more characters of addresses when space permits. +- Fixed bug when signing messages under 64 hex characters long. +- Add disclaimer view with placeholder text for first time users. + +## 2.3.1 2016-06-09 + +- Style up the info page +- Cache identicon images to optimize for long lists of transactions. +- Fix out of gas errors + +## 2.3.0 2016-06-06 + +- Show network status in title bar +- Added seed word recovery to config screen. +- Clicking network status indicator now reveals a provider menu. + +## 2.2.0 2016-06-02 + +- Redesigned init, vault create, vault restore and seed confirmation screens. +- Added pending transactions to transaction list on account screen. +- Clicking a pending transaction takes you back to the transaction approval screen. +- Update provider-engine to fix intermittent out of gas errors. + +## 2.1.0 2016-05-26 + +- Added copy address button to account list. +- Fixed back button on confirm transaction screen. +- Add indication of pending transactions to account list screen. +- Fixed bug where error warning was sometimes not cleared on view transition. +- Updated eth-lightwallet to fix a critical security issue. + +## 2.0.0 2016-05-23 + +- UI Overhaul per Vlad Todirut's designs. +- Replaced identicons with jazzicons. +- Fixed glitchy transitions. +- Added support for capitalization-based address checksums. +- Send value is no longer limited by javascript number precision, and is always in ETH. +- Added ability to generate new accounts. +- Added ability to locally nickname accounts. + +## 1.8.4 2016-05-13 + +- Point rpc servers to https endpoints. + +## 1.8.3 2016-05-12 + +- Bumped web3 to 0.6.0 +- Really fixed `eth_syncing` method response. + +## 1.8.2 2016-05-11 + +- Fixed bug where send view would not load correctly the first time it was visited per account. +- Migrated all users to new scalable backend. +- Fixed `eth_syncing` method response. + +## 1.8.1 2016-05-10 + +- Initial usage of scalable blockchain backend. +- Made official providers more easily configurable for us internally. + +## 1.8.0 2016-05-10 + +- Add support for calls to `eth.sign`. +- Moved account exporting within subview of the account detail view. +- Added buttons to the account export process. +- Improved visual appearance of account detail transition where button heights would change. +- Restored back button to account detail view. +- Show transaction list always, never collapsed. +- Changing provider now reloads current Dapps +- Improved appearance of transaction list in account detail view. + +## 1.7.0 2016-04-29 + +- Account detail view is now the primary view. +- The account detail view now has a "Change acct" button which shows the account list. +- Clicking accounts in the account list now both selects that account and displays that account's detail view. +- Selected account is now persisted between sessions, so the current account stays selected. +- Account icons are now "identicons" (deterministically generated from the address). +- Fixed link to Slack channel. +- Added a context guard for "define" to avoid UMD's exporting themselves to the wrong module system, fixing interference with some websites. +- Transaction list now only shows transactions for the current account. +- Transaction list now only shows transactions for the current network (mainnet, testnet, testrpc). +- Fixed transaction links to etherscan blockchain explorer. +- Fixed some UI transitions that had weird behavior. + +## 1.6.0 2016-04-22 + +- Pending transactions are now persisted to localStorage and resume even after browser is closed. +- Completed transactions are now persisted and can be displayed via UI. +- Added transaction list to account detail view. +- Fix bug on config screen where current RPC address was always displayed wrong. +- Fixed bug where entering a decimal value when sending a transaction would result in sending the wrong amount. +- Add save button to custom RPC input field. +- Add quick-select button for RPC on `localhost:8545`. +- Improve config view styling. +- Users have been migrated from old test-net RPC to a newer test-net RPC. + +## 1.5.1 2016-04-15 + +- Corrected text above account list. Selected account is visible to all sites, not just the current domain. +- Merged the UI codebase into the main plugin codebase for simpler maintenance. +- Fix Ether display rounding error. Now rendering to four decimal points. +- Fix some inpage synchronous methods +- Change account rendering to show four decimals and a leading zero. + +## 1.5.0 2016-04-13 + +- Added ability to send ether. +- Fixed bugs related to using Javascript numbers, which lacked appropriate precision. +- Replaced Etherscan main-net provider with our own production RPC. + +## 1.4.0 2016-04-08 + +- Removed extra entropy text field for simplified vault creation. +- Now supports exporting an account's private key. +- Unified button and input styles across the app. +- Removed some non-working placeholder UI until it works. +- Fix popup's web3 stream provider +- Temporarily deactivated fauceting indication because it would activate when restoring an empty account. + +## 1.3.2 2016-04-04 + + - When unlocking, first account is auto-selected. + - When creating a first vault on the test-net, the first account is auto-funded. + - Fixed some styling issues. + +## 1.0.1-1.3.1 + +Many changes not logged. Hopefully beginning to log consistently now! + +## 1.0.0 + +Made seed word restoring BIP44 compatible. + +## 0.14.0 + +Added the ability to restore accounts from seed words. diff --git a/test/unit/development/sample-manifest.json b/test/unit/development/sample-manifest.json new file mode 100644 index 000000000..2b3acf1b5 --- /dev/null +++ b/test/unit/development/sample-manifest.json @@ -0,0 +1,71 @@ +{ + "name": "MetaMask", + "short_name": "Metamask", + "version": "4.1.3", + "manifest_version": 2, + "author": "https://metamask.io", + "description": "Ethereum Browser Extension", + "commands": { + "_execute_browser_action": { + "suggested_key": { + "windows": "Alt+Shift+M", + "mac": "Alt+Shift+M", + "chromeos": "Alt+Shift+M", + "linux": "Alt+Shift+M" + } + } + }, + "icons": { + "16": "images/icon-16.png", + "128": "images/icon-128.png" + }, + "applications": { + "gecko": { + "id": "webextension@metamask.io" + } + }, + "default_locale": "en", + "background": { + "scripts": [ + "scripts/chromereload.js", + "scripts/background.js" + ], + "persistent": true + }, + "browser_action": { + "default_icon": { + "19": "images/icon-19.png", + "38": "images/icon-38.png" + }, + "default_title": "MetaMask", + "default_popup": "popup.html" + }, + "content_scripts": [ + { + "matches": [ + "file://*/*", + "http://*/*", + "https://*/*" + ], + "js": [ + "scripts/contentscript.js" + ], + "run_at": "document_start", + "all_frames": true + } + ], + "permissions": [ + "storage", + "clipboardWrite", + "http://localhost:8545/", + "https://*.infura.io/" + ], + "web_accessible_resources": [ + "scripts/inpage.js" + ], + "externally_connectable": { + "matches": [ + "https://metamask.io/*" + ] + } +} diff --git a/test/unit/development/version–bump-test.js b/test/unit/development/version–bump-test.js new file mode 100644 index 000000000..1c445c8b4 --- /dev/null +++ b/test/unit/development/version–bump-test.js @@ -0,0 +1,45 @@ +const assert = require('assert') +const versionBump = require('../../../development/version-bump') +const { promisify } = require('util') +const fs = require('fs') +const readFile = promisify(fs.readFile) +const path = require('path') +const changelogPath = path.join(__dirname, 'sample-changelog.md') +const manifest = require('./sample-manifest.json') +let changelog + + +describe('version bumper', function () { + + beforeEach(async () => { + // load changelog. Mock version is 4.1.3 + const changeBuffer = await readFile(changelogPath) + changelog = changeBuffer.toString() + }) + + it('returns a properly bumped major version', async function () { + const result = await versionBump('major', changelog, manifest) + const expected = '5.0.0' + assert.equal(result.version, expected, 'major bumps correctly') + assert.equal(result.manifest.version, expected, 'major bumps correctly') + assert.ok(result.changelog.includes(expected)) + }) + + it('returns a properly bumped minor version', async function () { + const result = await versionBump('minor', changelog, manifest) + const expected = '4.2.0' + assert.equal(result.version, expected, 'minor bumps correctly') + assert.equal(result.manifest.version, expected, 'minor bumps correctly') + assert.ok(result.changelog.includes(expected)) + }) + + it('returns a properly bumped patch version', async function () { + const result = await versionBump('patch', changelog, manifest) + const expected = '4.1.4' + assert.equal(result.version, expected, 'patch bumps correctly') + assert.equal(result.manifest.version, expected, 'patch bumps correctly') + assert.ok(result.changelog.includes(expected)) + }) +}) + + diff --git a/test/unit/edge-encryptor-test.js b/test/unit/edge-encryptor-test.js new file mode 100644 index 000000000..d3f014d74 --- /dev/null +++ b/test/unit/edge-encryptor-test.js @@ -0,0 +1,101 @@ +const assert = require('assert') + +const EdgeEncryptor = require('../../app/scripts/edge-encryptor') + +var password = 'passw0rd1' +var data = 'some random data' + +global.crypto = global.crypto || { + getRandomValues: function (array) { + for (let i = 0; i < array.length; i++) { + array[i] = Math.random() * 100 + } + return array + } +} + +describe('EdgeEncryptor', function () { + + const edgeEncryptor = new EdgeEncryptor() + describe('encrypt', function () { + + it('should encrypt the data.', function (done) { + edgeEncryptor.encrypt(password, data) + .then(function (encryptedData) { + assert.notEqual(data, encryptedData) + assert.notEqual(encryptedData.length, 0) + done() + }).catch(function (err) { + done(err) + }) + }) + + it('should return proper format.', function (done) { + edgeEncryptor.encrypt(password, data) + .then(function (encryptedData) { + let encryptedObject = JSON.parse(encryptedData) + assert.ok(encryptedObject.data, 'there is no data') + assert.ok(encryptedObject.iv && encryptedObject.iv.length != 0, 'there is no iv') + assert.ok(encryptedObject.salt && encryptedObject.salt.length != 0, 'there is no salt') + done() + }).catch(function (err) { + done(err) + }) + }) + + it('should not return the same twice.', function (done) { + + const encryptPromises = [] + encryptPromises.push(edgeEncryptor.encrypt(password, data)) + encryptPromises.push(edgeEncryptor.encrypt(password, data)) + + Promise.all(encryptPromises).then((encryptedData) => { + assert.equal(encryptedData.length, 2) + assert.notEqual(encryptedData[0], encryptedData[1]) + assert.notEqual(encryptedData[0].length, 0) + assert.notEqual(encryptedData[1].length, 0) + done() + }) + }) + }) + + describe('decrypt', function () { + it('should be able to decrypt the encrypted data.', function (done) { + + edgeEncryptor.encrypt(password, data) + .then(function (encryptedData) { + edgeEncryptor.decrypt(password, encryptedData) + .then(function (decryptedData) { + assert.equal(decryptedData, data) + done() + }) + .catch(function (err) { + done(err) + }) + }) + .catch(function (err) { + done(err) + }) + }) + + it('cannot decrypt the encrypted data with wrong password.', function (done) { + + edgeEncryptor.encrypt(password, data) + .then(function (encryptedData) { + edgeEncryptor.decrypt('wrong password', encryptedData) + .then(function (decryptedData) { + assert.fail('could decrypt with wrong password') + done() + }) + .catch(function (err) { + assert.ok(err instanceof Error) + assert.equal(err.message, 'Incorrect password') + done() + }) + }) + .catch(function (err) { + done(err) + }) + }) + }) +}) diff --git a/test/unit/message-manager-test.js b/test/unit/message-manager-test.js index 9b76241ed..5e7039841 100644 --- a/test/unit/message-manager-test.js +++ b/test/unit/message-manager-test.js @@ -1,11 +1,11 @@ const assert = require('assert') -const MessageManger = require('../../app/scripts/lib/message-manager') +const MessageManager = require('../../app/scripts/lib/message-manager') describe('Message Manager', function () { let messageManager beforeEach(function () { - messageManager = new MessageManger() + messageManager = new MessageManager() }) describe('#getMsgList', function () { diff --git a/test/unit/metamask-controller-test.js b/test/unit/metamask-controller-test.js index 3fc7f9a98..adeca9b5f 100644 --- a/test/unit/metamask-controller-test.js +++ b/test/unit/metamask-controller-test.js @@ -1,129 +1,103 @@ const assert = require('assert') const sinon = require('sinon') const clone = require('clone') +const nock = require('nock') const MetaMaskController = require('../../app/scripts/metamask-controller') +const blacklistJSON = require('../stub/blacklist') const firstTimeState = require('../../app/scripts/first-time-state') -const BN = require('ethereumjs-util').BN -const GWEI_BN = new BN('1000000000') describe('MetaMaskController', function () { - const noop = () => {} - const metamaskController = new MetaMaskController({ - showUnconfirmedMessage: noop, - unlockAccountMessage: noop, - showUnapprovedTx: noop, - platform: {}, - encryptor: { - encrypt: function(password, object) { - this.object = object - return Promise.resolve() - }, - decrypt: function () { - return Promise.resolve(this.object) - } - }, - // initial state - initState: clone(firstTimeState), - }) + let metamaskController + const sandbox = sinon.sandbox.create() + const noop = () => { } beforeEach(function () { - // sinon allows stubbing methods that are easily verified - this.sinon = sinon.sandbox.create() + + nock('https://api.infura.io') + .persist() + .get('/v2/blacklist') + .reply(200, blacklistJSON) + + nock('https://api.infura.io') + .persist() + .get(/.*/) + .reply(200) + + metamaskController = new MetaMaskController({ + showUnapprovedTx: noop, + encryptor: { + encrypt: function (password, object) { + this.object = object + return Promise.resolve() + }, + decrypt: function () { + return Promise.resolve(this.object) + }, + }, + initState: clone(firstTimeState), + }) + sandbox.spy(metamaskController.keyringController, 'createNewVaultAndKeychain') + sandbox.spy(metamaskController.keyringController, 'createNewVaultAndRestore') }) afterEach(function () { - // sinon requires cleanup otherwise it will overwrite context - this.sinon.restore() + nock.cleanAll() + sandbox.restore() }) - describe('Metamask Controller', function () { - assert(metamaskController) - - beforeEach(function () { - sinon.spy(metamaskController.keyringController, 'createNewVaultAndKeychain') - sinon.spy(metamaskController.keyringController, 'createNewVaultAndRestore') - }) - - afterEach(function () { - metamaskController.keyringController.createNewVaultAndKeychain.restore() - metamaskController.keyringController.createNewVaultAndRestore.restore() - }) - - describe('#getGasPrice', function () { - it('gives the 50th percentile lowest accepted gas price from recentBlocksController', async function () { - const realRecentBlocksController = metamaskController.recentBlocksController - metamaskController.recentBlocksController = { - store: { - getState: () => { - return { - recentBlocks: [ - { gasPrices: [ '0x3b9aca00', '0x174876e800'] }, - { gasPrices: [ '0x3b9aca00', '0x174876e800'] }, - { gasPrices: [ '0x174876e800', '0x174876e800' ]}, - { gasPrices: [ '0x174876e800', '0x174876e800' ]}, - ] - } - } - } - } - - const gasPrice = metamaskController.getGasPrice() - assert.equal(gasPrice, '0x3b9aca00', 'accurately estimates 50th percentile accepted gas price') - - metamaskController.recentBlocksController = realRecentBlocksController - }) - - it('gives the 1 gwei price if no blocks have been seen.', async function () { - const realRecentBlocksController = metamaskController.recentBlocksController - metamaskController.recentBlocksController = { - store: { - getState: () => { - return { - recentBlocks: [] - } + describe('#getGasPrice', function () { + it('gives the 50th percentile lowest accepted gas price from recentBlocksController', async function () { + const realRecentBlocksController = metamaskController.recentBlocksController + metamaskController.recentBlocksController = { + store: { + getState: () => { + return { + recentBlocks: [ + { gasPrices: [ '0x3b9aca00', '0x174876e800'] }, + { gasPrices: [ '0x3b9aca00', '0x174876e800'] }, + { gasPrices: [ '0x174876e800', '0x174876e800' ]}, + { gasPrices: [ '0x174876e800', '0x174876e800' ]}, + ], } - } - } - - const gasPrice = metamaskController.getGasPrice() - assert.equal(gasPrice, '0x' + GWEI_BN.toString(16), 'defaults to 1 gwei') + }, + }, + } - metamaskController.recentBlocksController = realRecentBlocksController - }) + const gasPrice = metamaskController.getGasPrice() + assert.equal(gasPrice, '0x3b9aca00', 'accurately estimates 50th percentile accepted gas price') + metamaskController.recentBlocksController = realRecentBlocksController }) + }) - describe('#createNewVaultAndKeychain', function () { - it('can only create new vault on keyringController once', async function () { - const selectStub = sinon.stub(metamaskController, 'selectFirstIdentity') - + describe('#createNewVaultAndKeychain', function () { + it('can only create new vault on keyringController once', async function () { + const selectStub = sandbox.stub(metamaskController, 'selectFirstIdentity') - const password = 'a-fake-password' + const password = 'a-fake-password' - const first = await metamaskController.createNewVaultAndKeychain(password) - const second = await metamaskController.createNewVaultAndKeychain(password) + await metamaskController.createNewVaultAndKeychain(password) + await metamaskController.createNewVaultAndKeychain(password) - assert(metamaskController.keyringController.createNewVaultAndKeychain.calledOnce) + assert(metamaskController.keyringController.createNewVaultAndKeychain.calledOnce) - selectStub.reset() - }) + selectStub.reset() }) + }) + + describe('#createNewVaultAndRestore', function () { + it('should be able to call newVaultAndRestore despite a mistake.', async function () { + + const password = 'what-what-what' + const wrongSeed = 'debris dizzy just program just float decrease vacant alarm reduce speak stadiu' + const rightSeed = 'debris dizzy just program just float decrease vacant alarm reduce speak stadium' + await metamaskController.createNewVaultAndRestore(password, wrongSeed) + .catch((e) => { + return + }) + await metamaskController.createNewVaultAndRestore(password, rightSeed) - describe('#createNewVaultAndRestore', function () { - it('should be able to call newVaultAndRestore despite a mistake.', async function () { - // const selectStub = sinon.stub(metamaskController, 'selectFirstIdentity') - - const password = 'what-what-what' - const wrongSeed = 'debris dizzy just program just float decrease vacant alarm reduce speak stadiu' - const rightSeed = 'debris dizzy just program just float decrease vacant alarm reduce speak stadium' - const first = await metamaskController.createNewVaultAndRestore(password, wrongSeed) - .catch((e) => { - return - }) - const second = await metamaskController.createNewVaultAndRestore(password, rightSeed) - - assert(metamaskController.keyringController.createNewVaultAndRestore.calledTwice) - }) + assert(metamaskController.keyringController.createNewVaultAndRestore.calledTwice) }) }) }) diff --git a/test/unit/migrations/021-test.js b/test/unit/migrations/021-test.js new file mode 100644 index 000000000..458e9b4b5 --- /dev/null +++ b/test/unit/migrations/021-test.js @@ -0,0 +1,16 @@ +const assert = require('assert') + +const wallet2 = require('../../lib/migrations/002.json') +const migration21 = require('../../../app/scripts/migrations/021') + +describe('wallet2 is migrated successfully with out the BlacklistController', () => { + it('should delete BlacklistController key', (done) => { + migration21.migrate(wallet2) + .then((migratedData) => { + assert.equal(migratedData.meta.version, 21) + assert(!migratedData.data.BlacklistController) + assert(!migratedData.data.RecentBlocks) + done() + }).catch(done) + }) +}) diff --git a/test/unit/network-contoller-test.js b/test/unit/network-contoller-test.js index 0b3b5adeb..dd0b52365 100644 --- a/test/unit/network-contoller-test.js +++ b/test/unit/network-contoller-test.js @@ -1,25 +1,40 @@ const assert = require('assert') +const nock = require('nock') const NetworkController = require('../../app/scripts/controllers/network') +const { createTestProviderTools } = require('../stub/provider') +const providerResultStub = {} +const provider = createTestProviderTools({ scaffold: providerResultStub }).provider + describe('# Network Controller', function () { let networkController + const noop = () => {} const networkControllerProviderInit = { - getAccounts: () => {}, + getAccounts: noop, } beforeEach(function () { + + nock('https://rinkeby.infura.io') + .persist() + .post('/metamask') + .reply(200) + networkController = new NetworkController({ - provider: { - type: 'rinkeby', - }, + provider, }) - networkController.initializeProvider(networkControllerProviderInit, dummyProviderConstructor) + networkController.initializeProvider(networkControllerProviderInit, provider) + }) + + afterEach(function () { + nock.cleanAll() }) + describe('network', function () { describe('#provider', function () { it('provider should be updatable without reassignment', function () { - networkController.initializeProvider(networkControllerProviderInit, dummyProviderConstructor) + networkController.initializeProvider(networkControllerProviderInit, provider) const proxy = networkController._proxy proxy.setTarget({ test: true, on: () => {} }) assert.ok(proxy.test) @@ -64,21 +79,4 @@ describe('# Network Controller', function () { }) }) }) -}) - -function dummyProviderConstructor() { - return { - // provider - sendAsync: noop, - // block tracker - _blockTracker: {}, - start: noop, - stop: noop, - on: noop, - addListener: noop, - once: noop, - removeAllListeners: noop, - } -} - -function noop() {}
\ No newline at end of file +})
\ No newline at end of file diff --git a/test/unit/pending-tx-test.js b/test/unit/pending-tx-test.js index bd47299cf..f0b4e3bfc 100644 --- a/test/unit/pending-tx-test.js +++ b/test/unit/pending-tx-test.js @@ -3,7 +3,7 @@ const ethUtil = require('ethereumjs-util') const EthTx = require('ethereumjs-tx') const ObservableStore = require('obs-store') const clone = require('clone') -const { createStubedProvider } = require('../stub/provider') +const { createTestProviderTools } = require('../stub/provider') const PendingTransactionTracker = require('../../app/scripts/lib/pending-tx-tracker') const MockTxGen = require('../lib/mock-tx-gen') const sinon = require('sinon') @@ -12,6 +12,7 @@ const currentNetworkId = 42 const otherNetworkId = 36 const privKey = new Buffer('8718b9618a37d1fc78c436511fc6df3c8258d3250635bba617f33003270ec03e', 'hex') + describe('PendingTransactionTracker', function () { let pendingTxTracker, txMeta, txMetaNoHash, txMetaNoRawTx, providerResultStub, provider, txMeta3, txList, knownErrors @@ -39,7 +40,7 @@ describe('PendingTransactionTracker', function () { txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d'}, } providerResultStub = {} - provider = createStubedProvider(providerResultStub) + provider = createTestProviderTools({ scaffold: providerResultStub }).provider pendingTxTracker = new PendingTransactionTracker({ provider, diff --git a/test/unit/responsive/components/dropdown-test.js b/test/unit/responsive/components/dropdown-test.js index 3ad2c390e..982d8c6ec 100644 --- a/test/unit/responsive/components/dropdown-test.js +++ b/test/unit/responsive/components/dropdown-test.js @@ -1,40 +1,45 @@ -var assert = require('assert'); +const assert = require('assert'); -const additions = require('react-testutils-additions'); const h = require('react-hyperscript'); -const ReactTestUtils = require('react-addons-test-utils'); const sinon = require('sinon'); const path = require('path'); -const Dropdown = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'dropdown.js')).Dropdown; -const DropdownMenuItem = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'dropdown.js')).DropdownMenuItem; +const Dropdown = require(path.join(__dirname, '..', '..', '..', '..', 'ui', 'app', 'components', 'dropdowns', 'index.js')).Dropdown; + +const { createMockStore } = require('redux-test-utils') +const { mountWithStore } = require('../../../lib/shallow-with-store') + +const mockState = { + metamask: { + } +} describe('Dropdown components', function () { let onClickOutside; let closeMenu; let onClick; - let dropdownComponentProps; - const renderer = ReactTestUtils.createRenderer() + let dropdownComponentProps = { + isOpen: true, + zIndex: 11, + onClickOutside, + style: { + position: 'absolute', + right: 0, + top: '36px', + }, + innerStyle: {}, + } + + let dropdownComponent + let store + let component beforeEach(function () { onClickOutside = sinon.spy(); closeMenu = sinon.spy(); onClick = sinon.spy(); - dropdownComponentProps = { - isOpen: true, - zIndex: 11, - onClickOutside, - style: { - position: 'absolute', - right: 0, - top: '36px', - }, - innerStyle: {}, - } - }); - - it('can render two items', function () { - const dropdownComponent = h( + store = createMockStore(mockState) + component = mountWithStore(h( Dropdown, dropdownComponentProps, [ @@ -42,74 +47,35 @@ describe('Dropdown components', function () { .drop-menu-item:hover { background:rgb(235, 235, 235); } .drop-menu-item i { margin: 11px; } `), - h(DropdownMenuItem, { + h('li', { closeMenu, onClick, }, 'Item 1'), - h(DropdownMenuItem, { + h('li', { closeMenu, onClick, }, 'Item 2'), ] - ) + ), store) + dropdownComponent = component + }) - const component = additions.renderIntoDocument(dropdownComponent); - renderer.render(dropdownComponent); - const items = additions.find(component, 'li'); + it('can render two items', function () { + const items = dropdownComponent.find('li'); assert.equal(items.length, 2); }); it('closes when item clicked', function() { - const dropdownComponent = h( - Dropdown, - dropdownComponentProps, - [ - h('style', ` - .drop-menu-item:hover { background:rgb(235, 235, 235); } - .drop-menu-item i { margin: 11px; } - `), - h(DropdownMenuItem, { - closeMenu, - onClick, - }, 'Item 1'), - h(DropdownMenuItem, { - closeMenu, - onClick, - }, 'Item 2'), - ] - ) - const component = additions.renderIntoDocument(dropdownComponent); - renderer.render(dropdownComponent); - const items = additions.find(component, 'li'); - const node = items[0]; - ReactTestUtils.Simulate.click(node); - assert.equal(closeMenu.calledOnce, true); + const items = dropdownComponent.find('li'); + const node = items.at(0); + node.simulate('click'); + assert.equal(node.props().closeMenu, closeMenu); }); it('invokes click handler when item clicked', function() { - const dropdownComponent = h( - Dropdown, - dropdownComponentProps, - [ - h('style', ` - .drop-menu-item:hover { background:rgb(235, 235, 235); } - .drop-menu-item i { margin: 11px; } - `), - h(DropdownMenuItem, { - closeMenu, - onClick, - }, 'Item 1'), - h(DropdownMenuItem, { - closeMenu, - onClick, - }, 'Item 2'), - ] - ) - const component = additions.renderIntoDocument(dropdownComponent); - renderer.render(dropdownComponent); - const items = additions.find(component, 'li'); - const node = items[0]; - ReactTestUtils.Simulate.click(node); + const items = dropdownComponent.find('li'); + const node = items.at(0); + node.simulate('click'); assert.equal(onClick.calledOnce, true); }); }); diff --git a/test/unit/seed-phrase-verifier-test.js b/test/unit/seed-phrase-verifier-test.js new file mode 100644 index 000000000..4e314806b --- /dev/null +++ b/test/unit/seed-phrase-verifier-test.js @@ -0,0 +1,133 @@ +const assert = require('assert') +const clone = require('clone') +const KeyringController = require('eth-keyring-controller') +const firstTimeState = require('../../app/scripts/first-time-state') +const seedPhraseVerifier = require('../../app/scripts/lib/seed-phrase-verifier') +const mockEncryptor = require('../lib/mock-encryptor') + +describe('SeedPhraseVerifier', function () { + + describe('verifyAccounts', function () { + + let password = 'passw0rd1' + let hdKeyTree = 'HD Key Tree' + + let keyringController + let vault + let primaryKeyring + + beforeEach(async function () { + keyringController = new KeyringController({ + initState: clone(firstTimeState), + encryptor: mockEncryptor, + }) + + assert(keyringController) + + vault = await keyringController.createNewVaultAndKeychain(password) + primaryKeyring = keyringController.getKeyringsByType(hdKeyTree)[0] + }) + + it('should be able to verify created account with seed words', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + + let serialized = await primaryKeyring.serialize() + let seedWords = serialized.mnemonic + assert.notEqual(seedWords.length, 0) + + let result = await seedPhraseVerifier.verifyAccounts(createdAccounts, seedWords) + }) + + it('should be able to verify created account (upper case) with seed words', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + + let upperCaseAccounts = [createdAccounts[0].toUpperCase()] + + let serialized = await primaryKeyring.serialize() + let seedWords = serialized.mnemonic + assert.notEqual(seedWords.length, 0) + + let result = await seedPhraseVerifier.verifyAccounts(upperCaseAccounts, seedWords) + }) + + it('should be able to verify created account (lower case) with seed words', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + let lowerCaseAccounts = [createdAccounts[0].toLowerCase()] + + let serialized = await primaryKeyring.serialize() + let seedWords = serialized.mnemonic + assert.notEqual(seedWords.length, 0) + + let result = await seedPhraseVerifier.verifyAccounts(lowerCaseAccounts, seedWords) + }) + + it('should return error with good but different seed words', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + + let serialized = await primaryKeyring.serialize() + let seedWords = 'debris dizzy just program just float decrease vacant alarm reduce speak stadium' + + try { + let result = await seedPhraseVerifier.verifyAccounts(createdAccounts, seedWords) + assert.fail("Should reject") + } catch (err) { + assert.ok(err.message.indexOf('Not identical accounts!') >= 0, 'Wrong error message') + } + }) + + it('should return error with undefined existing accounts', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + + let serialized = await primaryKeyring.serialize() + let seedWords = 'debris dizzy just program just float decrease vacant alarm reduce speak stadium' + + try { + let result = await seedPhraseVerifier.verifyAccounts(undefined, seedWords) + assert.fail("Should reject") + } catch (err) { + assert.equal(err.message, 'No created accounts defined.') + } + }) + + it('should return error with empty accounts array', async function () { + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 1) + + let serialized = await primaryKeyring.serialize() + let seedWords = 'debris dizzy just program just float decrease vacant alarm reduce speak stadium' + + try { + let result = await seedPhraseVerifier.verifyAccounts([], seedWords) + assert.fail("Should reject") + } catch (err) { + assert.equal(err.message, 'No created accounts defined.') + } + }) + + it('should be able to verify more than one created account with seed words', async function () { + + const keyState = await keyringController.addNewAccount(primaryKeyring) + const keyState2 = await keyringController.addNewAccount(primaryKeyring) + + let createdAccounts = await primaryKeyring.getAccounts() + assert.equal(createdAccounts.length, 3) + + let serialized = await primaryKeyring.serialize() + let seedWords = serialized.mnemonic + assert.notEqual(seedWords.length, 0) + + let result = await seedPhraseVerifier.verifyAccounts(createdAccounts, seedWords) + }) + }) +}) diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 36f3e1c68..cc99afee4 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -1,11 +1,12 @@ const assert = require('assert') const ethUtil = require('ethereumjs-util') const EthTx = require('ethereumjs-tx') +const EthjsQuery = require('ethjs-query') const ObservableStore = require('obs-store') const sinon = require('sinon') const TransactionController = require('../../app/scripts/controllers/transactions') const TxGasUtils = require('../../app/scripts/lib/tx-gas-utils') -const { createStubedProvider, createEthJsQueryStub } = require('../stub/provider') +const { createTestProviderTools } = require('../stub/provider') const noop = () => true const currentNetworkId = 42 @@ -14,11 +15,18 @@ const privKey = new Buffer('8718b9618a37d1fc78c436511fc6df3c8258d3250635bba617f3 describe('Transaction Controller', function () { - let txController, provider, providerResultStub + let txController, provider, providerResultStub, testBlockchain beforeEach(function () { - providerResultStub = {} - provider = createStubedProvider(providerResultStub) + providerResultStub = { + // 1 gwei + eth_gasPrice: '0x0de0b6b3a7640000', + // by default, all accounts are external accounts (not contracts) + eth_getCode: '0x', + } + const providerTools = createTestProviderTools({ scaffold: providerResultStub }) + provider = providerTools.provider + testBlockchain = providerTools.testBlockchain txController = new TransactionController({ provider, @@ -30,10 +38,7 @@ describe('Transaction Controller', function () { resolve() }), }) - txController.query = createEthJsQueryStub(provider) - txController.txGasUtil.query = createEthJsQueryStub(provider) txController.nonceTracker.getNonceLock = () => Promise.resolve({ nextNonce: 0, releaseLock: noop }) - txController.txProviderUtils = new TxGasUtils(txController.provider) }) describe('#getState', function () { @@ -155,15 +160,6 @@ describe('Transaction Controller', function () { }) describe('#addUnapprovedTransaction', function () { - let addTxDefaults - beforeEach(() => { - addTxDefaults = txController.addTxDefaults - txController.addTxDefaults = function addTxDefaultsStub () { return Promise.resolve() } - - }) - afterEach(() => { - txController.addTxDefaults = addTxDefaults - }) it('should add an unapproved transaction and return a valid txMeta', function (done) { txController.addUnapprovedTransaction({}) @@ -219,7 +215,7 @@ describe('Transaction Controller', function () { var sample = { value: '0x01', } - txController.txProviderUtils.validateTxParams(sample).then(() => { + txController.txGasUtil.validateTxParams(sample).then(() => { done() }).catch(done) }) @@ -228,7 +224,7 @@ describe('Transaction Controller', function () { var sample = { value: '-0x01', } - txController.txProviderUtils.validateTxParams(sample) + txController.txGasUtil.validateTxParams(sample) .then(() => done('expected to thrown on negativity values but didn\'t')) .catch((err) => { assert.ok(err, 'error') diff --git a/test/unit/tx-gas-util-test.js b/test/unit/tx-gas-util-test.js index ccef31359..d9a12d1c3 100644 --- a/test/unit/tx-gas-util-test.js +++ b/test/unit/tx-gas-util-test.js @@ -1,12 +1,12 @@ const assert = require('assert') const TxGasUtils = require('../../app/scripts/lib/tx-gas-utils') -const { createStubedProvider } = require('../stub/provider') +const { createTestProviderTools } = require('../stub/provider') describe('Tx Gas Util', function () { let txGasUtil, provider, providerResultStub beforeEach(function () { providerResultStub = {} - provider = createStubedProvider(providerResultStub) + provider = createTestProviderTools({ scaffold: providerResultStub }).provider txGasUtil = new TxGasUtils({ provider, }) diff --git a/test/unit/tx-state-manager-test.js b/test/unit/tx-state-manager-test.js index 464e50ee4..220bf501f 100644 --- a/test/unit/tx-state-manager-test.js +++ b/test/unit/tx-state-manager-test.js @@ -5,7 +5,7 @@ const TxStateManager = require('../../app/scripts/lib/tx-state-manager') const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-helper') const noop = () => true -describe('TransactionStateManger', function () { +describe('TransactionStateManager', function () { let txStateManager const currentNetworkId = 42 const otherNetworkId = 2 @@ -238,4 +238,47 @@ describe('TransactionStateManger', function () { assert.equal(txStateManager.getFilteredTxList(filterParams).length, 5, `getFilteredTxList - ${JSON.stringify(filterParams)}`) }) }) -})
\ No newline at end of file + + describe('#wipeTransactions', function () { + + const specificAddress = '0xaa' + const otherAddress = '0xbb' + + it('should remove only the transactions from a specific address', function () { + + const txMetas = [ + { id: 0, status: 'unapproved', txParams: { from: specificAddress, to: otherAddress }, metamaskNetworkId: currentNetworkId }, + { id: 1, status: 'confirmed', txParams: { from: otherAddress, to: specificAddress }, metamaskNetworkId: currentNetworkId }, + { id: 2, status: 'confirmed', txParams: { from: otherAddress, to: specificAddress }, metamaskNetworkId: currentNetworkId }, + ] + txMetas.forEach((txMeta) => txStateManager.addTx(txMeta, noop)) + + txStateManager.wipeTransactions(specificAddress) + + const transactionsFromCurrentAddress = txStateManager.getTxList().filter((txMeta) => txMeta.txParams.from === specificAddress) + const transactionsFromOtherAddresses = txStateManager.getTxList().filter((txMeta) => txMeta.txParams.from !== specificAddress) + + assert.equal(transactionsFromCurrentAddress.length, 0) + assert.equal(transactionsFromOtherAddresses.length, 2) + }) + + it('should not remove the transactions from other networks', function () { + const txMetas = [ + { id: 0, status: 'unapproved', txParams: { from: specificAddress, to: otherAddress }, metamaskNetworkId: currentNetworkId }, + { id: 1, status: 'confirmed', txParams: { from: specificAddress, to: otherAddress }, metamaskNetworkId: otherNetworkId }, + { id: 2, status: 'confirmed', txParams: { from: specificAddress, to: otherAddress }, metamaskNetworkId: otherNetworkId }, + ] + + txMetas.forEach((txMeta) => txStateManager.addTx(txMeta, noop)) + + txStateManager.wipeTransactions(specificAddress) + + const txsFromCurrentNetworkAndAddress = txStateManager.getTxList().filter((txMeta) => txMeta.txParams.from === specificAddress) + const txFromOtherNetworks = txStateManager.getFullTxList().filter((txMeta) => txMeta.metamaskNetworkId === otherNetworkId) + + assert.equal(txsFromCurrentNetworkAndAddress.length, 0) + assert.equal(txFromOtherNetworks.length, 2) + + }) + }) +}) diff --git a/test/unit/ui/add-token.spec.js b/test/unit/ui/add-token.spec.js new file mode 100644 index 000000000..69b7fb620 --- /dev/null +++ b/test/unit/ui/add-token.spec.js @@ -0,0 +1,43 @@ +const assert = require('assert') +const { createMockStore } = require('redux-test-utils') +const h = require('react-hyperscript') +const { shallowWithStore } = require('../../lib/shallow-with-store') +const AddTokenScreen = require('../../../old-ui/app/add-token') + +describe('Add Token Screen', function () { + let addTokenComponent, store, component + const mockState = { + metamask: { + identities: { + '0x7d3517b0d011698406d6e0aed8453f0be2697926': { + 'address': '0x7d3517b0d011698406d6e0aed8453f0be2697926', + 'name': 'Add Token Name', + }, + }, + }, + } + beforeEach(function () { + store = createMockStore(mockState) + component = shallowWithStore(h(AddTokenScreen), store) + addTokenComponent = component.dive() + }) + + describe('#ValidateInputs', function () { + + it('Default State', function () { + addTokenComponent.instance().validateInputs() + const state = addTokenComponent.state() + assert.equal(state.warning, 'Address is invalid.') + }) + + it('Address is a Metamask Identity', function () { + addTokenComponent.setState({ + address: '0x7d3517b0d011698406d6e0aed8453f0be2697926', + }) + addTokenComponent.instance().validateInputs() + const state = addTokenComponent.state() + assert.equal(state.warning, 'Personal address detected. Input the token contract address.') + }) + + }) +}) |