diff --git a/src/families/cosmos/api/Cosmos.ts b/src/families/cosmos/api/Cosmos.ts index e179aa04ee..19f0d878b9 100644 --- a/src/families/cosmos/api/Cosmos.ts +++ b/src/families/cosmos/api/Cosmos.ts @@ -46,7 +46,9 @@ export const getAccountInfo = async (address: string): Promise => { } }; -export const getAccount = async (address: string): Promise => { +export const getAccount = async ( + address: string +): Promise<{ address: string; accountNumber: number; sequence: number }> => { const response = { address: address, accountNumber: 0, diff --git a/src/families/cosmos/js-createTransaction.ts b/src/families/cosmos/js-createTransaction.ts index 0da7675ffb..1027809f3a 100644 --- a/src/families/cosmos/js-createTransaction.ts +++ b/src/families/cosmos/js-createTransaction.ts @@ -1,5 +1,5 @@ import { BigNumber } from "bignumber.js"; -import type { Transaction } from "./types"; +import type { CosmosDelegationInfo, Transaction } from "./types"; /** * Create an empty transaction @@ -17,7 +17,7 @@ const createTransaction = (): Transaction => ({ networkInfo: null, memo: null, cosmosSourceValidator: null, - validators: [], + validators: [] as CosmosDelegationInfo[], }); export default createTransaction; diff --git a/src/families/cosmos/js-signOperation.ts b/src/families/cosmos/js-signOperation.ts index 8ede2b5a0b..d8fb56515e 100644 --- a/src/families/cosmos/js-signOperation.ts +++ b/src/families/cosmos/js-signOperation.ts @@ -154,6 +154,7 @@ const signOperation = ({ recipients, accountId, date: new Date(), + transactionSequenceNumber: sequence, }; o.next({ diff --git a/src/families/cosmos/js-synchronisation.ts b/src/families/cosmos/js-synchronisation.ts index 5e19f25b74..d5eb008b08 100644 --- a/src/families/cosmos/js-synchronisation.ts +++ b/src/families/cosmos/js-synchronisation.ts @@ -33,6 +33,9 @@ const txToOps = (info: any, id: string, txs: any): Operation[] => { extra: { validators: [] as CosmosDelegationInfo[], }, + transactionSequenceNumber: parseInt( + tx.tx.auth_info.signer_infos[0].sequence + ), }; tx.logs[0].events.forEach((message) => {