|
|
@ -43,8 +43,9 @@ function MetamaskInpageProvider (connectionStream) { |
|
|
|
// handle sendAsync requests via asyncProvider
|
|
|
|
// handle sendAsync requests via asyncProvider
|
|
|
|
self.sendAsync = function (payload, cb) { |
|
|
|
self.sendAsync = function (payload, cb) { |
|
|
|
// rewrite request ids
|
|
|
|
// rewrite request ids
|
|
|
|
var request = eachJsonMessage(payload, (message) => { |
|
|
|
var request = eachJsonMessage(payload, (_message) => { |
|
|
|
var newId = createRandomId() |
|
|
|
const message = Object.assign({}, _message) |
|
|
|
|
|
|
|
const newId = createRandomId() |
|
|
|
self.idMap[newId] = message.id |
|
|
|
self.idMap[newId] = message.id |
|
|
|
message.id = newId |
|
|
|
message.id = newId |
|
|
|
return message |
|
|
|
return message |
|
|
|