Consensys / eth-lightwallet

Lightweight JS Wallet for Node and the browser
MIT License
1.46k stars 501 forks source link

Given address "'+ address +'" is not a valid Ethereum address. #190

Closed maddadder closed 11 months ago

maddadder commented 6 years ago

Traced bug to:

https://github.com/ethereumjs/ethereumjs-vm/blob/master/lib/cache.js var address = Buffer.from(addressHex, 'hex') addressHex starts with 0x, and this procedure results in an invalid address.

Would suggest something like: var address = Buffer.from(addressHex.replace(/0x/, ''), 'hex')