Skip to content

Commit

Permalink
feat: activeGatewayId for lightning
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodylow committed Mar 23, 2024
1 parent 04dc113 commit 35b9e4c
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 39 deletions.
8 changes: 6 additions & 2 deletions fedimint-clientd/src/router/handlers/fedimint/admin/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub struct JoinRequest {
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct JoinResponse {
pub this_federation_id: FederationId,
pub federation_ids: Vec<FederationId>,
}

Expand All @@ -40,13 +41,16 @@ async fn _join(mut multimint: MultiMint, req: JoinRequest) -> Result<JoinRespons
None
};

let _ = multimint
let this_federation_id = multimint
.register_new(req.invite_code.clone(), manual_secret)
.await?;

let federation_ids = multimint.ids().await.into_iter().collect::<Vec<_>>();

Ok(JoinResponse { federation_ids })
Ok(JoinResponse {
this_federation_id,
federation_ids,
})
}

pub async fn handle_ws(state: AppState, v: Value) -> Result<Value, AppError> {
Expand Down
Loading

0 comments on commit 35b9e4c

Please sign in to comment.