|
|
|
@ -75,6 +75,10 @@ module.exports = class MetamaskController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onRpcRequest (stream, originDomain, request) { |
|
|
|
|
|
|
|
|
|
/* Commented out for Parity compliance |
|
|
|
|
* Parity does not permit additional keys, like `origin`, |
|
|
|
|
* and Infura is not currently filtering this key out. |
|
|
|
|
var payloads = Array.isArray(request) ? request : [request] |
|
|
|
|
payloads.forEach(function (payload) { |
|
|
|
|
// Append origin to rpc payload
|
|
|
|
@ -86,6 +90,7 @@ module.exports = class MetamaskController { |
|
|
|
|
payload.params.push({ origin: originDomain }) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
// handle rpc request
|
|
|
|
|
this.provider.sendAsync(request, function onPayloadHandled (err, response) { |
|
|
|
|