Skip to content

Commit

Permalink
Merge pull request #669 from shemnon/truthy
Browse files Browse the repository at this point in the history
Fix ethereum adapter zero nonce issue
  • Loading branch information
nklincoln authored Nov 27, 2019
2 parents ff99335 + 68594fc commit 8c90b1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/caliper-ethereum/lib/ethereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class Ethereum extends BlockchainInterface {
let methodType = 'send';
if (methodCall.isView) {
methodType = 'call';
} else if (context.nonces && context.nonces[context.fromAddress]) {
} else if (context.nonces && (typeof context.nonces[context.fromAddress] !== 'undefined')) {
let nonce = context.nonces[context.fromAddress];
context.nonces[context.fromAddress] = nonce + 1;
params.nonce = nonce;
Expand Down

0 comments on commit 8c90b1c

Please sign in to comment.