diff --git a/src/js/actions/SendFormActions.js b/src/js/actions/SendFormActions.js index 7709c645..b24575a3 100644 --- a/src/js/actions/SendFormActions.js +++ b/src/js/actions/SendFormActions.js @@ -855,9 +855,9 @@ export const onSend = (): AsyncAction => { const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, currentState.currency); const pendingNonce: number = stateUtils.getPendingNonce(pending); - const nonce = pendingNonce >= account.nonce ? pendingNonce + 1 : account.nonce; + const nonce = pendingNonce > 0 && pendingNonce >= account.nonce ? pendingNonce : account.nonce; - console.warn("NONCE", nonce, account.nonce, stateUtils.getPendingNonce(pending)) + console.warn("NONCE", nonce, account.nonce, pendingNonce) const txData = { address_n, diff --git a/src/js/reducers/utils/index.js b/src/js/reducers/utils/index.js index 2fcb5602..b7feadea 100644 --- a/src/js/reducers/utils/index.js +++ b/src/js/reducers/utils/index.js @@ -94,7 +94,7 @@ export const getAccountPendingTx = (pending: Array, account: ?Account export const getPendingNonce = (pending: Array): number => { return pending.reduce((value: number, tx: PendingTx) => { if (tx.rejected) return value; - return Math.max(value, tx.nonce); + return Math.max(value, tx.nonce + 1); }, 0); }