aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-07-06 06:48:40 +0800
committerDan Finlay <dan@danfinlay.com>2017-07-06 06:49:51 +0800
commited8a71d35074c5ee0a6c4c03ae366f59ab6bc519 (patch)
tree14485e7cbdf3a24299775801c27c50595f92e938 /app
parentb72861fc9848a474badac076951d5286a996d2e8 (diff)
parent8aab5d965b2095683baaf35bf1de6450de981800 (diff)
downloadtangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar.gz
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar.bz2
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar.lz
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar.xz
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.tar.zst
tangerine-wallet-browser-ed8a71d35074c5ee0a6c4c03ae366f59ab6bc519.zip
Merge branch 'master' into NewUI
Diffstat (limited to 'app')
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/metamask-controller.js11
2 files changed, 10 insertions, 3 deletions
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",
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)