Bugfix: sequence number is 0 for first tx
This commit is contained in:
parent
c13b8c4351
commit
85e57bcab2
@ -495,7 +495,7 @@ export class CosmWasmConnection implements BlockchainConnection {
|
||||
accountNumber,
|
||||
currentSequence,
|
||||
);
|
||||
if (!sequenceForTx) throw new Error("Cound not find matching sequence for this transaction");
|
||||
if (sequenceForTx === undefined) throw new Error("Cound not find matching sequence for this transaction");
|
||||
|
||||
const nonce = accountToNonce(accountNumber, sequenceForTx);
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ export async function findSequenceForSignedTx(
|
||||
chainId: string,
|
||||
accountNumber: number,
|
||||
upperBound: number,
|
||||
min = 1,
|
||||
min = 0,
|
||||
): Promise<number | undefined> {
|
||||
const firstSignature = tx.value.signatures.find(() => true);
|
||||
if (!firstSignature) throw new Error("Signature missing in tx");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user