From af8015c1c58589386acd6a2d00111944cffac44f Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 3 Jul 2017 18:06:47 -0700 Subject: [PATCH 1/3] Version 3.8.2 --- CHANGELOG.md | 2 ++ app/manifest.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07f55bf2b..bcbd81e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +## 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. diff --git a/app/manifest.json b/app/manifest.json index c0d9af8a0..12ff6c2ea 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "3.8.1", + "version": "3.8.2", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", From 68fc3603dfe72721e080a80b9a4103408e113c6c Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 4 Jul 2017 12:48:00 -0700 Subject: [PATCH 2/3] metamask - append dapp origin domain to rpc request --- app/scripts/metamask-controller.js | 11 +++++++++-- package.json | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 782641b3f..73093dfad 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -184,7 +184,9 @@ module.exports = class MetamaskController extends EventEmitter { eth_syncing: false, web3_clientVersion: `MetaMask/v${version}`, }, + // rpc data source rpcUrl: this.networkController.getCurrentRpcAddress(), + originHttpHeaderKey: 'X-Metamask-Origin', // account mgmt getAccounts: (cb) => { const isUnlocked = this.keyringController.memStore.getState().isUnlocked @@ -356,8 +358,13 @@ module.exports = class MetamaskController extends EventEmitter { } setupProviderConnection (outStream, originDomain) { - streamIntoProvider(outStream, this.provider, logger) - function logger (err, request, response) { + streamIntoProvider(outStream, this.provider, onRequest, onResponse) + // append dapp origin domain to request + function onRequest (request) { + request.origin = originDomain + } + // log rpc activity + function onResponse (err, request, response) { if (err) return console.error(err) if (response.error) { console.error('Error in RPC response:\n', response.error) diff --git a/package.json b/package.json index 3b608af0e..27fe7a84a 100644 --- a/package.json +++ b/package.json @@ -124,8 +124,8 @@ "valid-url": "^1.0.9", "vreme": "^3.0.2", "web3": "0.19.1", - "web3-provider-engine": "^13.0.3", - "web3-stream-provider": "^2.0.6", + "web3-provider-engine": "^13.1.1", + "web3-stream-provider": "^3.0.1", "xtend": "^4.0.1" }, "devDependencies": { From 52a6b9f103fecfd92f860188daf15e1fa943ab5f Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 5 Jul 2017 10:30:48 -0700 Subject: [PATCH 3/3] Reenable Default Token List Looks pretty clear to me now that the heavy traffic spike was not this feature, but was the EOS crowdsale. Now that we've mitigated their traffic spike, I think we can safely re-introduce this feature. --- CHANGELOG.md | 3 +++ ui/app/components/token-list.js | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcbd81e30..e7934dc77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Current Master +- Re-enable default token list. +- Add origin header to dapp-bound requests to allow providers to throttle sites. + ## 3.8.2 2017-7-3 - No longer show network loading indication on config screen, to allow selecting custom RPCs. diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js index fed7e9f7a..20cfa897e 100644 --- a/ui/app/components/token-list.js +++ b/ui/app/components/token-list.js @@ -6,7 +6,6 @@ const TokenCell = require('./token-cell.js') const normalizeAddress = require('eth-sig-util').normalize const defaultTokens = [] -/* const contracts = require('eth-contract-metadata') for (const address in contracts) { const contract = contracts[address] @@ -15,7 +14,6 @@ for (const address in contracts) { defaultTokens.push(contract) } } -*/ module.exports = TokenList