Merge pull request #943 from cosmos/add-hash-to-async-response
Add hash field to BroadcastTxAsyncResponse
This commit is contained in:
commit
66fa0d65c6
11
CHANGELOG.md
11
CHANGELOG.md
@ -6,6 +6,17 @@ and this project adheres to
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- @cosmjs/tendermint-rpc: Add `hash` field to `BroadcastTxAsyncResponse`
|
||||
([#938]).
|
||||
|
||||
[#938]: https://github.com/cosmos/cosmjs/issues/938
|
||||
|
||||
### Fixed
|
||||
|
||||
- @cosmjs/tendermint-rpc: Add missing `BlockSearchResponse` case to `Response`.
|
||||
|
||||
### Changed
|
||||
|
||||
- @cosmjs/stargate: Remove verified queries from `AuthExtension` and
|
||||
|
||||
@ -8,6 +8,7 @@ export type Response =
|
||||
| AbciQueryResponse
|
||||
| BlockResponse
|
||||
| BlockResultsResponse
|
||||
| BlockSearchResponse
|
||||
| BlockchainResponse
|
||||
| BroadcastTxAsyncResponse
|
||||
| BroadcastTxSyncResponse
|
||||
@ -70,8 +71,12 @@ export interface BlockchainResponse {
|
||||
readonly blockMetas: readonly BlockMeta[];
|
||||
}
|
||||
|
||||
/** No data in here because RPC method BroadcastTxAsync "returns right away, with no response" */
|
||||
export interface BroadcastTxAsyncResponse {}
|
||||
/**
|
||||
* No transaction data in here because RPC method BroadcastTxAsync "returns right away, with no response"
|
||||
*/
|
||||
export interface BroadcastTxAsyncResponse {
|
||||
readonly hash: Uint8Array;
|
||||
}
|
||||
|
||||
export interface BroadcastTxSyncResponse extends TxData {
|
||||
readonly hash: Uint8Array;
|
||||
|
||||
@ -90,8 +90,7 @@ function defaultTestSuite(rpcFactory: () => RpcClient, expected: ExpectedValues)
|
||||
const tx = buildKvTx(randomString(), randomString());
|
||||
|
||||
const response = await client.broadcastTxAsync({ tx: tx });
|
||||
// TODO: Remove any cast after https://github.com/cosmos/cosmjs/issues/938
|
||||
expect((response as any).hash.length).toEqual(32);
|
||||
expect(response.hash.length).toEqual(32);
|
||||
|
||||
client.disconnect();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user