From a0fe881c97b778132b589dd9d378a8a78fa42359 Mon Sep 17 00:00:00 2001 From: Adnan Deniz Corlu <96479349+Ninjatosba@users.noreply.github.com> Date: Sun, 8 Dec 2024 22:47:47 +0300 Subject: [PATCH] generate ts code (#109) --- contracts/stream/src/contract.rs | 1 + packages/types/src/stream/msg.rs | 4 +++- ts/types/StreamSwapStream.types.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contracts/stream/src/contract.rs b/contracts/stream/src/contract.rs index 893ad47..739593d 100644 --- a/contracts/stream/src/contract.rs +++ b/contracts/stream/src/contract.rs @@ -888,6 +888,7 @@ pub fn query_stream(deps: Deps, _env: Env) -> StdResult { url: stream_info.url, current_streamed_price: stream.current_streamed_price, stream_admin: stream_info.stream_admin.into_string(), + threshold: stream.threshold, }; Ok(stream) } diff --git a/packages/types/src/stream/msg.rs b/packages/types/src/stream/msg.rs index 9bcf928..66319f5 100644 --- a/packages/types/src/stream/msg.rs +++ b/packages/types/src/stream/msg.rs @@ -104,7 +104,7 @@ pub struct StreamResponse { pub dist_index: Decimal256, /// Last updated time of stream. pub last_updated: Timestamp, - + /// Out asset of the stream. pub out_asset: Coin, /// Total number of remaining out tokens at the time of update. pub out_remaining: Uint256, @@ -126,6 +126,8 @@ pub struct StreamResponse { pub status: Status, /// Address of the stream admin. pub stream_admin: String, + /// Threshold for the stream to be finalized. + pub threshold: Option, } #[cw_serde] diff --git a/ts/types/StreamSwapStream.types.ts b/ts/types/StreamSwapStream.types.ts index de25d1c..4cf279e 100644 --- a/ts/types/StreamSwapStream.types.ts +++ b/ts/types/StreamSwapStream.types.ts @@ -152,6 +152,7 @@ export interface StreamResponse { in_denom: string; in_supply: Uint256; last_updated: Timestamp; + name: string; out_asset: Coin; out_remaining: Uint256; shares: Uint256; @@ -159,6 +160,7 @@ export interface StreamResponse { start_time: Timestamp; status: Status; stream_admin: string; + threshold?: Uint256 | null; treasury: string; url?: string | null; } \ No newline at end of file