Remove RpcTxEvent.index

This commit is contained in:
Simon Warta 2022-12-07 21:21:16 +01:00
parent 308499cbcd
commit a2882fb13c
5 changed files with 2 additions and 10 deletions

View File

@ -9,6 +9,8 @@ and this project adheres to
### Changed
- all: The TypeScript compilation target is now ES2020 ([#1002]).
- @cosmjs/tendermint-rpc: Remove unused `index` field from `RpcTxEvent` and
`TxEvent`. This is unset starting with Tendermint 0.34.
[#1002]: https://github.com/cosmos/cosmjs/issues/1002

View File

@ -732,8 +732,6 @@ interface RpcTxEvent {
readonly tx: string;
readonly result: RpcTxData;
readonly height: string;
/** Not set since Tendermint 0.34 */
readonly index?: number;
}
function decodeTxEvent(data: RpcTxEvent): responses.TxEvent {
@ -743,7 +741,6 @@ function decodeTxEvent(data: RpcTxEvent): responses.TxEvent {
hash: hashTx(tx),
result: decodeTxData(data.result),
height: apiToSmallInt(assertNotEmpty(data.height)),
index: may(apiToSmallInt, data.index),
};
}

View File

@ -174,8 +174,6 @@ export interface TxEvent {
readonly tx: Uint8Array;
readonly hash: Uint8Array;
readonly height: number;
/** @deprecated this value is not set in Tendermint 0.34+ */
readonly index?: number;
readonly result: TxData;
}

View File

@ -733,8 +733,6 @@ interface RpcTxEvent {
readonly tx: string;
readonly result: RpcTxData;
readonly height: string;
/** Not set since Tendermint 0.34 */
readonly index?: number;
}
function decodeTxEvent(data: RpcTxEvent): responses.TxEvent {
@ -744,7 +742,6 @@ function decodeTxEvent(data: RpcTxEvent): responses.TxEvent {
hash: hashTx(tx),
result: decodeTxData(data.result),
height: apiToSmallInt(assertNotEmpty(data.height)),
index: may(apiToSmallInt, data.index),
};
}

View File

@ -174,8 +174,6 @@ export interface TxEvent {
readonly tx: Uint8Array;
readonly hash: Uint8Array;
readonly height: number;
/** @deprecated this value is not set in Tendermint 0.34+ */
readonly index?: number;
readonly result: TxData;
}