Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
simplify conversion of nonce/balance in run call
Browse files Browse the repository at this point in the history
  • Loading branch information
MicaiahReid committed Sep 22, 2022
1 parent f539085 commit d964e1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chains/ethereum/ethereum/src/helpers/run-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export async function applySimulationOverrides(
const account = await eei.getAccount(vmAddr);

if (nonce != null) {
account.nonce = Quantity.toBigInt(nonce === "" ? "0x0" : nonce);
account.nonce = nonce === "" ? 0n : Quantity.toBigInt(nonce);
}
if (balance != null) {
account.balance = Quantity.toBigInt(balance === "" ? "0x0" : balance);
account.balance = balance === "" ? 0n : Quantity.toBigInt(balance);
}
if (code != null) {
// geth treats empty strings as "0x" code for overrides
Expand Down

0 comments on commit d964e1c

Please sign in to comment.