From 2aaec1d9fbaa340ee9971278b6fafd1ad49bdbf2 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Thu, 21 Mar 2019 19:42:23 +0000 Subject: Stop reloading dapps on network change allowing dapps to decide if it should refresh or not (#6330) * feat: `inpageProvider.autoRefreshOnNetworkChange` to allow dapps to control if it refreshes or not * feat: check the `autoRefreshOnNetworkChange` before a refresh * fix linting error * fix: use `window.ethereum` now `web3.ethereum` --- app/scripts/inpage.js | 4 ++++ app/scripts/lib/auto-reload.js | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'app') diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index c7f0c5669..68394d1ae 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -91,6 +91,10 @@ inpageProvider.enable = function ({ force } = {}) { }) } +// give the dapps control of a refresh they can toggle this off on the window.ethereum +// this will be default true so it does not break any old apps. +inpageProvider.autoRefreshOnNetworkChange = true + // add metamask-specific convenience methods inpageProvider._metamask = new Proxy({ /** diff --git a/app/scripts/lib/auto-reload.js b/app/scripts/lib/auto-reload.js index 558391a06..44fbe847c 100644 --- a/app/scripts/lib/auto-reload.js +++ b/app/scripts/lib/auto-reload.js @@ -20,6 +20,10 @@ function setupDappAutoReload (web3, observable) { }) observable.subscribe(function (state) { + // if the auto refresh on network change is false do not + // do anything + if (!window.ethereum.autoRefreshOnNetworkChange) return + // if reload in progress, no need to check reload logic if (reloadInProgress) return -- cgit v1.2.3 From 31175625b446cb5d18b17db23018bca8b14d280c Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Thu, 21 Mar 2019 16:03:30 -0700 Subject: Folder restructure (#6304) * Remove ui/app/keychains/ * Remove ui/app/img/ (unused images) * Move conversion-util to helpers/utils/ * Move token-util to helpers/utils/ * Move /helpers/*.js inside /helpers/utils/ * Move util tests inside /helpers/utils/ * Renameand move confirm-transaction/util.js to helpers/utils/ * Move higher-order-components to helpers/higher-order-components/ * Move infura-conversion.json to helpers/constants/ * Move all utility functions to helpers/utils/ * Move pages directory to top-level * Move all constants to helpers/constants/ * Move metametrics inside helpers/ * Move app and root inside pages/ * Move routes inside helpers/ * Re-organize ducks/ * Move reducers to ducks/ * Move selectors inside selectors/ * Move test out of test folder * Move action, reducer, store inside store/ * Move ui components inside ui/ * Move UI components inside ui/ * Move connected components inside components/app/ * Move i18n-helper inside helpers/ * Fix unit tests * Fix unit test * Move pages components * Rename routes component * Move reducers to ducks/index * Fix bad path in unit test --- app/scripts/controllers/transactions/tx-gas-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index b296dc5eb..765551167 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -7,7 +7,7 @@ const { const { addHexPrefix } = require('ethereumjs-util') const SIMPLE_GAS_COST = '0x5208' // Hex for 21000, cost of a simple send. -import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/constants/error-keys' +import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys' /** tx-gas-utils are gas utility methods for Transaction manager -- cgit v1.2.3 From 468bc96bdfc08e80119b3d5b3a54a3cf84046af8 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 22 Mar 2019 12:20:12 -0230 Subject: Hide gas price chart and prevent api call when not on ethereum networks. (#6300) Add missing translations in gas customization modal --- app/_locales/en/messages.json | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 08e6014f8..1d5d1674c 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -11,6 +11,9 @@ "exposeDescription": { "message": "Expose accounts to the current website. Useful for legacy dapps." }, + "chartOnlyAvailableEth": { + "message": "Chart only available on Ethereum networks." + }, "confirmExpose": { "message": "Are you sure you want to expose your accounts to the current website?" }, -- cgit v1.2.3 From 4ff9126ff2fddba40d3f210c757796458528ef42 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 22 Mar 2019 12:32:07 -0230 Subject: Replaces the coinbase link in the deposit modal with one for wyre (#6302) --- app/_locales/en/messages.json | 9 +++++++++ app/images/wyre.svg | 9 +++++++++ app/scripts/lib/buy-eth-url.js | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/images/wyre.svg (limited to 'app') diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 1d5d1674c..cb785023e 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -191,6 +191,12 @@ "buyCoinbaseExplainer": { "message": "Coinbase is the world’s most popular way to buy and sell Bitcoin, Ethereum, and Litecoin." }, + "buyWithWyre": { + "message": "Buy ETH with Wyre" + }, + "buyWithWyreDescription": { + "message": "Wyre lets you use aa credit card to deposit ETH right in to your MetaMask account. From the Airswap website, click \"Use Fiat\" in the top-right corner. You can also use Airswap to get started with ERC 20 tokens!" + }, "bytes": { "message": "Bytes" }, @@ -296,6 +302,9 @@ "continueToCoinbase": { "message": "Continue to Coinbase" }, + "continueToWyre": { + "message": "Continue to Wyre" + }, "contractDeployment": { "message": "Contract Deployment" }, diff --git a/app/images/wyre.svg b/app/images/wyre.svg new file mode 100644 index 000000000..a5209329d --- /dev/null +++ b/app/images/wyre.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/scripts/lib/buy-eth-url.js b/app/scripts/lib/buy-eth-url.js index 4e2d0bc79..040b5695b 100644 --- a/app/scripts/lib/buy-eth-url.js +++ b/app/scripts/lib/buy-eth-url.js @@ -15,7 +15,7 @@ function getBuyEthUrl ({ network, amount, address }) { let url switch (network) { case '1': - url = `https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${amount}&address=${address}&crypto_currency=ETH` + url = `https://dash.sendwyre.com/sign-up` break case '3': -- cgit v1.2.3 From 961ad267df93cbb3fc61d0a999bd78f132c877b1 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 25 Mar 2019 13:43:23 -0230 Subject: New settings page rebased (#6333) * New setting tab * Add InfoTab * Add Advanced tab * Add Security Tab * Finish mobile view * Make new setting page responsive * Fix linter * Fix y scrolling * Update link in network dropdown * Fix e2e tests * Remove duplicate translation key * Resolve merge conflict * Only change settings header in popup view. * Place mobile-sync button in advanced-tab of settings --- app/_locales/en/messages.json | 30 +++++++++++++++++++++++++++--- app/images/caret-left-black.svg | 18 ++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 app/images/caret-left-black.svg (limited to 'app') diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index cb785023e..ca6761183 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -44,6 +44,9 @@ "providerRequestInfo": { "message": "This site is requesting access to view your current account address. Always make sure you trust the sites you interact with." }, + "aboutUs": { + "message": "About Us" + }, "accept": { "message": "Accept" }, @@ -74,6 +77,12 @@ "address": { "message": "Address" }, + "advanced": { + "message": "Advanced" + }, + "advancedSettingsDescription": { + "message": "Access developer features, download State Logs, Reset Account, setup testnets and custom RPC." + }, "advancedOptions": { "message": "Advanced Options" }, @@ -92,9 +101,6 @@ "addAcquiredTokens": { "message": "Add the tokens you've acquired using MetaMask" }, - "advanced": { - "message": "Advanced" - }, "agreeTermsOfService": { "message": "I agree to the Terms of Service" }, @@ -236,6 +242,9 @@ "chromeRequiredForHardwareWallets": { "message": "You need to use MetaMask on Google Chrome in order to connect to your Hardware Wallet." }, + "company": { + "message": "Company" + }, "confirm": { "message": "Confirm" }, @@ -619,6 +628,12 @@ "gasPriceRequired": { "message": "Gas Price Required" }, + "general": { + "message": "General" + }, + "generalSettingsDescription": { + "message": "Currency conversion, primary currency, language, blockies identicon" + }, "generatingTransaction": { "message": "Generating transaction" }, @@ -790,6 +805,9 @@ "ledgerAccountRestriction": { "message": "You need to make use your last account before you can add a new one." }, + "legal": { + "message": "Legal" + }, "lessThanMax": { "message": "must be less than or equal to $1.", "description": "helper for inputting hex as decimal input" @@ -1240,6 +1258,12 @@ "secretPhrase": { "message": "Enter your secret twelve word phrase here to restore your vault." }, + "securityAndPrivacy": { + "message": "Security & Privacy" + }, + "securitySettingsDescription": { + "message": "Privacy settings and wallet seed phrase" + }, "secondsShorthand": { "message": "Sec" }, diff --git a/app/images/caret-left-black.svg b/app/images/caret-left-black.svg new file mode 100644 index 000000000..872135ece --- /dev/null +++ b/app/images/caret-left-black.svg @@ -0,0 +1,18 @@ + + + + 8439120D-5704-4273-B416-FEE134322584 + Created with sketchtool. + + + + + + + + + + + + + -- cgit v1.2.3 From 2f13a97d00858e90ca264bd7f2667736812a27ef Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 25 Mar 2019 13:55:23 -0230 Subject: Cancel error rebased (#6341) * Check balance before showing cancel * Fix linter * Use existing helper methods for calculating increased cancel price * Add tooltip for disabled button * Lint fix for cancelError branch. * Disabling of cancel button should account for value of tx. --- app/_locales/en/messages.json | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index ca6761183..eab243b8a 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -989,6 +989,9 @@ "noTransactions": { "message": "You have no transactions" }, + "notEnoughGas": { + "message": "Not Enough Gas" + }, "notFound": { "message": "Not Found" }, -- cgit v1.2.3 From 2a0b98492a6f29015940d0798654e6dc864df2c3 Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Tue, 26 Mar 2019 11:07:53 -0400 Subject: enable privacy mode for first time users (#6347) --- app/scripts/controllers/preferences.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index f92341353..737411890 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -40,7 +40,9 @@ class PreferencesController { // Feature flag toggling is available in the global namespace // for convenient testing of pre-release features, and should never // perform sensitive operations. - featureFlags: {}, + featureFlags: { + privacyMode: true, + }, knownMethodData: {}, participateInMetaMetrics: null, firstTimeFlowType: null, -- cgit v1.2.3 From 91c4c3bdce4c6a5e1873a9b3922db1594dadc474 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 26 Mar 2019 14:33:15 -0230 Subject: Version 6.3.0 (#6350) --- app/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/manifest.json b/app/manifest.json index df5b67bb9..6837adf61 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_appName__", "short_name": "__MSG_appName__", - "version": "6.2.2", + "version": "6.3.0", "manifest_version": 2, "author": "https://metamask.io", "description": "__MSG_appDescription__", -- cgit v1.2.3