diff --git a/remix-simulator/src/methods/accounts.js b/remix-simulator/src/methods/accounts.js index b0563c7c57..176cd129c4 100644 --- a/remix-simulator/src/methods/accounts.js +++ b/remix-simulator/src/methods/accounts.js @@ -45,7 +45,7 @@ Accounts.prototype.methods = function () { } Accounts.prototype.eth_accounts = function (payload, cb) { - return cb(null, this.accountsList.map((x) => x.address)) + return cb(null, this.accountsList.map((x) => ethJSUtil.toChecksumAddress(x.address))) } Accounts.prototype.eth_getBalance = function (payload, cb) { diff --git a/remix-simulator/src/methods/transactions.js b/remix-simulator/src/methods/transactions.js index 75e82a20d1..b861fc4b3d 100644 --- a/remix-simulator/src/methods/transactions.js +++ b/remix-simulator/src/methods/transactions.js @@ -26,6 +26,10 @@ Transactions.prototype.methods = function () { } Transactions.prototype.eth_sendTransaction = function (payload, cb) { + // from might be lowercased address (web3) + if (payload.params && payload.params.length > 0 && payload.params[0].from) { + payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) + } processTx(this.accounts, payload, false, cb) } @@ -70,6 +74,10 @@ Transactions.prototype.eth_getCode = function (payload, cb) { } Transactions.prototype.eth_call = function (payload, cb) { + // from might be lowercased address (web3) + if (payload.params && payload.params.length > 0 && payload.params[0].from) { + payload.params[0].from = ethJSUtil.toChecksumAddress(payload.params[0].from) + } processTx(this.accounts, payload, true, cb) }