nash_native_client/
types.rs

1
2#[derive(Clone, Copy)]
3pub enum Environment {
4    Production,
5    Sandbox,
6    Dev(&'static str),
7}
8
9impl Environment {
10    pub fn url(&self) -> &str {
11        match self {
12            Self::Production => "app.nash.io",
13            Self::Sandbox => "app.sandbox.nash.io",
14            Self::Dev(s) => s,
15        }
16    }
17}
18
19impl From<openlimits_exchange::exchange::Environment> for Environment {
20    fn from(from: openlimits_exchange::exchange::Environment) -> Self {
21        match from {
22            openlimits_exchange::exchange::Environment::Production => Environment::Production,
23            openlimits_exchange::exchange::Environment::Sandbox => Environment::Sandbox
24        }
25    }
26}