Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Dec 23, 2023
1 parent b4d2902 commit 93e56d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion integrationtests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn test_integration() -> anyhow::Result<()> {
"my_admin_key",
"http://127.0.0.1:6100",
)))
.with_fee(LightningFeeConfig::new(0.0, 0))
.with_fee((0.0, 0).into())
.build();

let result = mokshamint::server::run_server(
Expand Down
9 changes: 9 additions & 0 deletions moksha-mint/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ impl LightningFeeConfig {
}
}

impl From<(f32, u64)> for LightningFeeConfig {
fn from(tuple: (f32, u64)) -> Self {
Self {
fee_percent: tuple.0,
fee_reserve_min: tuple.1,
}
}
}

fn env_or_default<T: std::str::FromStr>(key: &str, default: T) -> T {
env::var(key)
.ok()
Expand Down

0 comments on commit 93e56d5

Please sign in to comment.