mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
Add hash to BroadcastTxAsyncResponse
This commit is contained in:
parent
e3ce6eb3d8
commit
90ebdd2bc4
@ -6,6 +6,13 @@ 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`.
|
||||
|
@ -71,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…
x
Reference in New Issue
Block a user