Increment sequence on every transaction

This commit is contained in:
Valtteri Karesto
2022-03-08 13:16:45 +02:00
parent 0a44b5b5d1
commit 09f58f18ae

View File

@@ -24,6 +24,10 @@ export const sendTransaction = async (account: IAccount, txOptions: TransactionO
Fee, // TODO auto-fillable
...opts
};
const currAcc = state.accounts.find(acc => acc.address === account.address);
if (currAcc) {
currAcc.sequence = account.sequence + 1;
}
const { logPrefix = '' } = options || {}
try {
const signedAccount = derive.familySeed(account.secret);