Remove RpcTxEvent.index
This commit is contained in:
parent
308499cbcd
commit
a2882fb13c
@ -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
|
||||
|
||||
|
||||
@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user