mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
inpage - bug fix
prevents mutation of original message object which causes problems with web3 1.0
This commit is contained in:
parent
32c799a135
commit
ea7e46ed38
@ -43,8 +43,9 @@ function MetamaskInpageProvider (connectionStream) {
|
||||
// handle sendAsync requests via asyncProvider
|
||||
self.sendAsync = function (payload, cb) {
|
||||
// rewrite request ids
|
||||
var request = eachJsonMessage(payload, (message) => {
|
||||
var newId = createRandomId()
|
||||
var request = eachJsonMessage(payload, (_message) => {
|
||||
const message = Object.assign({}, _message)
|
||||
const newId = createRandomId()
|
||||
self.idMap[newId] = message.id
|
||||
message.id = newId
|
||||
return message
|
||||
|
Loading…
Reference in New Issue
Block a user