Skip to content

Commit

Permalink
chore: move server to new module
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Oct 25, 2023
1 parent 4d7e3ff commit fd63832
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 406 deletions.
2 changes: 1 addition & 1 deletion flutter/native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ crate-type = ["cdylib", "staticlib"]
[dependencies]
moksha-wallet = { version = "0.1.2", path = "../../moksha-wallet" }
moksha-core = { ersion = "0.1.2", path = "../../moksha-core" }
moksha-fedimint = { ersion = "0.1.2", path = "../../moksha-fedimint" }
moksha-fedimint = { version = "0.1.2", path = "../../moksha-fedimint" }

tracing = "0.1.40"
anyhow = { version = "1.0.75", features = ["backtrace"] }
Expand Down
2 changes: 1 addition & 1 deletion integrationtests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn test_integration() -> anyhow::Result<()> {
.with_fee(0.0, 0)
.build();

let result = mokshamint::run_server(
let result = mokshamint::server::run_server(
mint.await.expect("Can not connect to lightning backend"),
"127.0.0.1:8686".parse().expect("invalid address"),
None,
Expand Down
7 changes: 2 additions & 5 deletions moksha-mint/src/bin/moksha-mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use mokshamint::{
AlbyLightningSettings, LightningType, LnbitsLightningSettings, LndLightningSettings,
StrikeLightningSettings,
},
MintBuilder,
mint::MintBuilder,
};
use std::{env, fmt, net::SocketAddr, path::PathBuf};

Expand All @@ -28,9 +28,6 @@ pub async fn main() -> anyhow::Result<()> {
.unwrap_or_else(|_| "[::]:3338".to_string())
.parse()?;

// read optional env var
// MINT_API_PREFIX

let api_prefix = env::var("MINT_API_PREFIX").ok();

let ln_backend = get_env("MINT_LIGHTNING_BACKEND");
Expand Down Expand Up @@ -86,7 +83,7 @@ pub async fn main() -> anyhow::Result<()> {
Err(_) => None,
};

mokshamint::run_server(mint?, host_port, serve_wallet_path, api_prefix).await
mokshamint::server::run_server(mint?, host_port, serve_wallet_path, api_prefix).await
}

#[derive(Debug, PartialEq)]
Expand Down
Loading

0 comments on commit fd63832

Please sign in to comment.