diff --git a/libs/remix-debug/test/decoder/vmCall.ts b/libs/remix-debug/test/decoder/vmCall.ts index 40438e4f63..0ab7299faf 100644 --- a/libs/remix-debug/test/decoder/vmCall.ts +++ b/libs/remix-debug/test/decoder/vmCall.ts @@ -54,15 +54,15 @@ export async function initVM (st, privateKey) { const vm = VM.vm var address = utileth.Address.fromPrivateKey(privateKey) - vm.stateManager.getAccount(address).then((account) => { + + try { + let account = await vm.stateManager.getAccount(address) account.balance = new BN('f00000000000000001', 16) - vm.stateManager.putAccount(address, account).catch((error) => { - console.log(error) - }) - }).catch((error) => { + await vm.stateManager.putAccount(address, account) + } catch (error) { console.log(error) - }) - + } + var web3Provider = new remixLib.vm.Web3VMProvider() web3Provider.setVM(vm) vm.web3 = web3Provider diff --git a/libs/remix-debug/test/vmCall.ts b/libs/remix-debug/test/vmCall.ts index ddba208a10..b3cd6bccf1 100644 --- a/libs/remix-debug/test/vmCall.ts +++ b/libs/remix-debug/test/vmCall.ts @@ -42,14 +42,14 @@ async function initVM (privateKey) { activatePrecompiles: true }) await vm.init() - vm.stateManager.getAccount(address).then((account) => { + + try { + let account = await vm.stateManager.getAccount(address) account.balance = new BN('f00000000000000001', 16) - vm.stateManager.putAccount(address, account).catch((error) => { - console.log(error) - }) - }).catch((error) => { + await vm.stateManager.putAccount(address, account) + } catch (error) { console.log(error) - }) + } var web3Provider = new remixLib.vm.Web3VMProvider() web3Provider.setVM(vm)