mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-01 10:43:39 -07:00
29 lines
739 B
Rust
29 lines
739 B
Rust
use brk_core::{Dollars, Sats};
|
|
|
|
#[derive(Debug, Default, Clone)]
|
|
pub struct UnrealizedState {
|
|
pub supply_in_profit: Sats,
|
|
pub supply_even: Sats,
|
|
pub supply_in_loss: Sats,
|
|
pub unrealized_profit: Dollars,
|
|
pub unrealized_loss: Dollars,
|
|
}
|
|
|
|
impl UnrealizedState {
|
|
pub const NAN: Self = Self {
|
|
supply_in_profit: Sats::ZERO,
|
|
supply_even: Sats::ZERO,
|
|
supply_in_loss: Sats::ZERO,
|
|
unrealized_profit: Dollars::NAN,
|
|
unrealized_loss: Dollars::NAN,
|
|
};
|
|
|
|
pub const ZERO: Self = Self {
|
|
supply_in_profit: Sats::ZERO,
|
|
supply_even: Sats::ZERO,
|
|
supply_in_loss: Sats::ZERO,
|
|
unrealized_profit: Dollars::ZERO,
|
|
unrealized_loss: Dollars::ZERO,
|
|
};
|
|
}
|