Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Cosmos JS #1800

Merged
17 commits merged into from Mar 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/families/cosmos/api/Cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ 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"
Expand Down Expand Up @@ -281,8 +283,12 @@ export const broadcast = async ({
);
}

return patchOperationWithHash(
const patchedOperation = patchOperationWithHash(
{ ...operation, blockHeight: data.tx_response.height },
data.tx_response.txhash
);

log("info", "debug operation: ", toOperationRaw(patchedOperation));

return patchedOperation;
};