Skip to content

Commit be15846

Browse files
committed
compile fix
1 parent 261f8a5 commit be15846

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const MAX_SEND_AMOUNT: u64 = 10_000_000;
6464

6565
#[tokio::main]
6666
async fn main() -> anyhow::Result<()> {
67-
let state = setup().await;
67+
let state = setup().await?;
6868

6969
let app = Router::new()
7070
.route("/api/onchain", post(onchain_handler))

src/setup.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use tonic_openssl_lnd::lnrpc;
55

66
use crate::AppState;
77

8-
pub async fn setup() -> AppState {
8+
pub async fn setup() -> anyhow::Result<AppState> {
99
// Load environment variables from various sources.
1010
dotenv::from_filename(".env.local").ok();
1111
dotenv::from_filename(".env").ok();
@@ -72,5 +72,11 @@ pub async fn setup() -> AppState {
7272
rpc
7373
};
7474

75-
AppState::new(host, keys, lightning_client, bitcoin_client, network)
75+
Ok(AppState::new(
76+
host,
77+
keys,
78+
lightning_client,
79+
bitcoin_client,
80+
network,
81+
))
7682
}

0 commit comments

Comments
 (0)