diff --git a/src/families/cosmos/api/Cosmos.ts b/src/families/cosmos/api/Cosmos.ts index 7eb3073633..e179aa04ee 100644 --- a/src/families/cosmos/api/Cosmos.ts +++ b/src/families/cosmos/api/Cosmos.ts @@ -3,8 +3,6 @@ import BigNumber from "bignumber.js"; import network from "../../../network"; import { Operation } from "../../../types"; import { patchOperationWithHash } from "../../../operation"; -import { log } from "@ledgerhq/logs"; -import { toOperationRaw } from "../../../account"; const defaultEndpoint = getEnv( "API_COSMOS_BLOCKCHAIN_EXPLORER_API_ENDPOINT" @@ -283,12 +281,5 @@ export const broadcast = async ({ ); } - const patchedOperation = patchOperationWithHash( - { ...operation, blockHeight: data.tx_response.height }, - data.tx_response.txhash - ); - - log("info", "debug operation: ", toOperationRaw(patchedOperation)); - - return patchedOperation; + return patchOperationWithHash(operation, data.tx_response.txhash); }; diff --git a/src/families/cosmos/js-synchronisation.ts b/src/families/cosmos/js-synchronisation.ts index 55701589ce..8495212a50 100644 --- a/src/families/cosmos/js-synchronisation.ts +++ b/src/families/cosmos/js-synchronisation.ts @@ -1,4 +1,4 @@ -import { Account, Operation } from "../../types"; +import { Account, Operation, OperationType } from "../../types"; import { BigNumber } from "bignumber.js"; import { makeSync, GetAccountShape, mergeOps } from "../../bridge/jsHelpers"; import { encodeAccountId } from "../../account"; @@ -20,13 +20,13 @@ const txToOps = (info: any, id: string, txs: any): Operation[] => { const op: Operation = { id: "", hash: tx.txhash, - type: "" as any, + type: "" as OperationType, value: new BigNumber(0), fee: fees, blockHash: null, - blockHeight: tx.height, - senders: [] as any, - recipients: [] as any, + blockHeight: null, + senders: [] as string[], + recipients: [] as string[], accountId: id, date: new Date(tx.timestamp), extra: {