diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-09-06 07:46:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 07:46:21 +0800 |
commit | ea7e46ed3843b2d38fe04efa232dc8f5cddb6186 (patch) | |
tree | 057e692ee7debdccbef7af8b370cd7c4cbf0c825 /app/scripts/lib | |
parent | 32c799a1359a0d558fec257c5e1bbd0e31d086f6 (diff) | |
download | tangerine-wallet-browser-ea7e46ed3843b2d38fe04efa232dc8f5cddb6186.tar.gz tangerine-wallet-browser-ea7e46ed3843b2d38fe04efa232dc8f5cddb6186.tar.zst tangerine-wallet-browser-ea7e46ed3843b2d38fe04efa232dc8f5cddb6186.zip |
inpage - bug fix
prevents mutation of original message object which causes problems with web3 1.0
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 7c74a62d3..c63af06dc 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -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 |