diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-10-06 06:26:26 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-10-06 06:26:56 +0800 |
commit | f21170c7c39a684697b99a2d97ed3e72f549b57e (patch) | |
tree | 757e6ff5cb8afe19a1689d3c97f8eae27051078e /app | |
parent | 3e09e6a9176852faee5c73863a97019c0de0b21d (diff) | |
download | tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar.gz tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar.bz2 tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar.lz tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar.xz tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.tar.zst tangerine-wallet-browser-f21170c7c39a684697b99a2d97ed3e72f549b57e.zip |
Add tolerance for sending from mixed-case addresses.
We had to convert to lower case, and also had to modify the new provider-engine sanitizer to tolerate mixed case addresses.
Fixes #707
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/id-management.js | 4 |
1 files changed, 2 insertions, 2 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)) |