fix: ETH transaction count nonce

This commit is contained in:
Sérgio Salgado 2022-06-06 23:33:54 +01:00
parent e49f91df33
commit 784e0ec768

View file

@ -125,7 +125,7 @@ function generateTx (_toAddress, wallet, amount, includesFee, cryptoCode) {
.then(([gas, gasPrice, txCount]) => [ .then(([gas, gasPrice, txCount]) => [
BN(gas), BN(gas),
BN(gasPrice), BN(gasPrice),
_.max([1, txCount, lastUsedNonces[fromAddress] + 1]) _.max([0, txCount, lastUsedNonces[fromAddress] + 1])
]) ])
.then(([gas, gasPrice, txCount]) => { .then(([gas, gasPrice, txCount]) => {
lastUsedNonces[fromAddress] = txCount lastUsedNonces[fromAddress] = txCount