diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-10-06 10:53:41 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-10-06 10:53:41 +0800 |
commit | 671b54ff71c7d80b9b12cc4b3dd75e262486ab76 (patch) | |
tree | b8e65343c229fe5548bca39323884ac44cf5fd91 /app/scripts/lib | |
parent | e20e0f661d81937e34fc2f930eee92b8fe2c7e04 (diff) | |
parent | 7c006dac559d1c1bdd999cb3ca03bd1834dcace5 (diff) | |
download | tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar.gz tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar.bz2 tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar.lz tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar.xz tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.tar.zst tangerine-wallet-browser-671b54ff71c7d80b9b12cc4b3dd75e262486ab76.zip |
Merge branch 'master' into tos
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/id-management.js | 4 | ||||
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/lib/id-management.js b/app/scripts/lib/id-management.js index e250943a0..2d42e1e30 100644 --- a/app/scripts/lib/id-management.js +++ b/app/scripts/lib/id-management.js @@ -26,7 +26,7 @@ function IdManagement (opts) { this.signTx = function (txParams) { // normalize values txParams.to = ethUtil.addHexPrefix(txParams.to) - txParams.from = ethUtil.addHexPrefix(txParams.from) + txParams.from = ethUtil.addHexPrefix(txParams.from.toLowerCase()) txParams.value = ethUtil.addHexPrefix(txParams.value) txParams.data = ethUtil.addHexPrefix(txParams.data) txParams.gasLimit = ethUtil.addHexPrefix(txParams.gasLimit || txParams.gas) @@ -51,7 +51,7 @@ function IdManagement (opts) { this.signMsg = function (address, message) { // sign message - var privKeyHex = this.exportPrivateKey(address) + var privKeyHex = this.exportPrivateKey(address.toLowerCase()) var privKey = ethUtil.toBuffer(privKeyHex) var msgSig = ethUtil.ecsign(new Buffer(message.replace('0x', ''), 'hex'), privKey) var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s)) diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 4f9fa1a7d..bcde333d0 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -33,7 +33,7 @@ function MetamaskInpageProvider (connectionStream) { }) asyncProvider.on('error', console.error.bind(console)) self.asyncProvider = asyncProvider - + self.idMap = {} // handle sendAsync requests via asyncProvider self.sendAsync = function(payload, cb){ @@ -61,7 +61,7 @@ function MetamaskInpageProvider (connectionStream) { MetamaskInpageProvider.prototype.send = function (payload) { const self = this - + let selectedAddress let result = null switch (payload.method) { @@ -80,8 +80,8 @@ MetamaskInpageProvider.prototype.send = function (payload) { // throw not-supported Error default: - var message = 'The MetaMask Web3 object does not support synchronous methods like ' + payload.method + - '. See https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#all-async---think-of-metamask-as-a-light-client for details.' + var link = 'https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#dizzy-all-async---think-of-metamask-as-a-light-client' + var message = `The MetaMask Web3 object does not support synchronous methods like ${payload.method}. See ${link} for details.` throw new Error(message) } |