Fix cooldown display
This commit is contained in:
Generated
+1
@@ -3882,6 +3882,7 @@ dependencies = [
|
||||
name = "pulse-trader"
|
||||
version = "0.1.0-alpha.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
"crossterm",
|
||||
"hypersdk",
|
||||
|
||||
+13
-4
@@ -6,15 +6,23 @@ edition = "2024"
|
||||
[dependencies]
|
||||
pulse-ui = { workspace = true }
|
||||
pulse-wire = { workspace = true }
|
||||
|
||||
chrono = "0.4.45"
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "fs", "io-util", "time", "process"] }
|
||||
crossterm = { workspace = true }
|
||||
hypersdk = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
tokio = { workspace = true, features = [
|
||||
"rt-multi-thread",
|
||||
"macros",
|
||||
"net",
|
||||
"fs",
|
||||
"io-util",
|
||||
"time",
|
||||
"process",
|
||||
] }
|
||||
chrono = "0.4.45"
|
||||
serde_json = "1"
|
||||
rand = "0.8.7"
|
||||
toml = "1.1.3"
|
||||
serde = { workspace = true }
|
||||
|
||||
[workspace]
|
||||
members = ["pulse-macros", "pulse-ui", "pulse-wire"]
|
||||
@@ -27,6 +35,7 @@ hypersdk = "0.2.14"
|
||||
tokio = "1.52.3"
|
||||
crossterm = "0.29.0"
|
||||
serde = { version = "1.0.229", features = ["serde_derive"] }
|
||||
anyhow = "1.0.104"
|
||||
|
||||
[[bin]]
|
||||
name = "pulse-trader"
|
||||
|
||||
@@ -6,6 +6,7 @@ mod hyper_types;
|
||||
pub mod plugin;
|
||||
pub mod terminal;
|
||||
pub mod units;
|
||||
pub use hypersdk;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::PulseWire;
|
||||
@@ -14,6 +15,7 @@ pub mod prelude {
|
||||
pub use crate::server_path;
|
||||
pub use crate::terminal::*;
|
||||
pub use crate::units::*;
|
||||
pub use hypersdk;
|
||||
}
|
||||
|
||||
pub fn server_path() -> PathBuf {
|
||||
|
||||
@@ -59,7 +59,7 @@ impl StrategyEngine {
|
||||
Arc::new(self)
|
||||
}
|
||||
|
||||
pub async fn run_strategy(&self) -> tokio::io::Result<()> {
|
||||
pub async fn run_strategy(&self) -> anyhow::Result<()> {
|
||||
let engine = self
|
||||
.engine
|
||||
.upgrade()
|
||||
@@ -157,8 +157,6 @@ impl StrategyEngine {
|
||||
Some(RiskMessage::Reject { reason }) => {}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn spawn(self: &Arc<Self>) {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ pub mod store;
|
||||
pub mod terminal;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> tokio::io::Result<()> {
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let engine = engine::Engine::new().await?;
|
||||
|
||||
let terminal_server = engine.spawn_terminal_server().await;
|
||||
|
||||
@@ -259,7 +259,7 @@ impl Formatted for Strategy {
|
||||
),
|
||||
Triple(
|
||||
&format!(
|
||||
"\x1b[96m{:?}\x1b[0m (\x1b[90m{:?} rec\x1b[0m)",
|
||||
"\x1b[96m{}\x1b[0m (\x1b[90m{} rec\x1b[0m)",
|
||||
self.cooldown, self.risk.cooldown
|
||||
),
|
||||
&format!("\x1b[96m{:?}\x1b[0m", self.strategy.author),
|
||||
|
||||
Reference in New Issue
Block a user