mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
background + notifications - add origin to message signatures
This commit is contained in:
parent
9f82672252
commit
092c191c1f
@ -153,7 +153,7 @@ function setupProviderConnection(stream, originDomain){
|
|||||||
if (payload.method === 'eth_sendTransaction') {
|
if (payload.method === 'eth_sendTransaction') {
|
||||||
payload.params[0].origin = originDomain
|
payload.params[0].origin = originDomain
|
||||||
} else if (payload.method === 'eth_sign') {
|
} else if (payload.method === 'eth_sign') {
|
||||||
payload.params.push(originDomain)
|
payload.params.push({ origin: originDomain })
|
||||||
}
|
}
|
||||||
// handle rpc request
|
// handle rpc request
|
||||||
provider.sendAsync(payload, function onPayloadHandled(err, response){
|
provider.sendAsync(payload, function onPayloadHandled(err, response){
|
||||||
|
@ -68,6 +68,7 @@ function createTxNotification(opts){
|
|||||||
|
|
||||||
function createMsgNotification(opts){
|
function createMsgNotification(opts){
|
||||||
var message = [
|
var message = [
|
||||||
|
'Submitted by '+opts.msgParams.origin,
|
||||||
'to be signed by: '+uiUtils.addressSummary(opts.msgParams.from),
|
'to be signed by: '+uiUtils.addressSummary(opts.msgParams.from),
|
||||||
'message:\n'+opts.msgParams.data,
|
'message:\n'+opts.msgParams.data,
|
||||||
].join('\n')
|
].join('\n')
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
"through2": "^2.0.1",
|
"through2": "^2.0.1",
|
||||||
"vreme": "^3.0.2",
|
"vreme": "^3.0.2",
|
||||||
"web3": "ethereum/web3.js#0.16.0",
|
"web3": "ethereum/web3.js#0.16.0",
|
||||||
"web3-provider-engine": "^7.6.5",
|
"web3-provider-engine": "^7.7.0",
|
||||||
"web3-stream-provider": "^2.0.1",
|
"web3-stream-provider": "^2.0.1",
|
||||||
"xtend": "^4.0.1"
|
"xtend": "^4.0.1"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user