fix account creation

pull/4962/head
aniket-engg 5 months ago committed by Aniket
parent 56d388c5ff
commit 1f3bf0b8b1
  1. 2
      libs/remix-simulator/src/methods/accounts.ts

@ -44,7 +44,7 @@ export class Web3Accounts {
async _addAccount (privateKey, balance) {
try {
privateKey = toBytes('0x' + privateKey)
if (typeof privateKey === 'string') privateKey = toBytes('0x' + privateKey)
const address: Uint8Array = privateToAddress(privateKey)
const addressStr = toChecksumAddress(bytesToHex(address))
this.accounts[addressStr] = { privateKey, nonce: 0 }

Loading…
Cancel
Save