This commit is contained in:
2026-07-29 06:57:25 +02:00
parent 90d3c59ff4
commit f3406c7b97
7 changed files with 62 additions and 51 deletions
Generated
+2
View File
@@ -3947,6 +3947,7 @@ version = "0.1.0-alpha.0"
dependencies = [
"hypersdk",
"postcard",
"rust_decimal",
"serde",
"tokio",
]
@@ -3963,6 +3964,7 @@ dependencies = [
"pulse-sdk",
"pulse-ui",
"rand 0.8.7",
"rust_decimal",
"serde",
"serde_json",
"tokio",
+2
View File
@@ -11,6 +11,7 @@ hypersdk = { workspace = true }
serde = { workspace = true }
anyhow = { workspace = true }
postcard = { workspace = true }
rust_decimal = { workspace = true }
tokio = { workspace = true, features = [
"rt-multi-thread",
"macros",
@@ -29,6 +30,7 @@ toml = "1.1.3"
members = ["pulse-ui", "pulse-sdk"]
[workspace.dependencies]
rust_decimal = { version = "1.39", features = ["serde-str"] }
postcard = { version = "1.1.3", features = ["alloc"] }
pulse-ui = { path = "pulse-ui", version = "0.1.0-alpha.0" }
pulse-sdk = { path = "pulse-sdk", version = "0.1.0-alpha.0" }
+1
View File
@@ -8,3 +8,4 @@ serde = { workspace = true }
hypersdk = { workspace = true }
postcard = { workspace = true }
tokio = { workspace = true, features = ["io-std"] }
rust_decimal = { workspace = true }
+1 -1
View File
@@ -1,4 +1,4 @@
use hypersdk::Decimal;
use rust_decimal::Decimal;
use crate::units::{Direction, Symbol, USD};
+1 -1
View File
@@ -1,4 +1,4 @@
use hypersdk::Decimal;
use rust_decimal::Decimal;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Symbol(pub String);
+1 -1
View File
@@ -1,4 +1,4 @@
use hypersdk::Decimal;
use rust_decimal::Decimal;
use pulse_sdk::prelude::*;
use serde_json::Value;
use std::collections::HashMap;
+10 -4
View File
@@ -53,7 +53,8 @@ impl TerminalClient {
let status = app.status.clone();
let inspect = app.inspect.clone();
tokio::spawn(Self::run_client(
tokio::spawn(async {
if let Err(v) = Self::run_client(
reader,
watch_list,
active_positions,
@@ -62,7 +63,12 @@ impl TerminalClient {
market_overview,
status,
inspect,
));
)
.await
{
panic!("{v}")
}
});
app.sock = Some(self);
@@ -80,6 +86,7 @@ impl TerminalClient {
status: State<Option<Status>>,
inspect: State<InspectTarget>,
) -> tokio::io::Result<()> {
loop {
let mut len_buf = [0u8; size_of::<usize>()];
reader
.read_exact(&mut len_buf)
@@ -128,7 +135,6 @@ impl TerminalClient {
logs.lock().await.push(v);
}
}
Ok(())
}
}
}