Skip to content

Commit

Permalink
chore: register federation config load errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolk131 committed Sep 29, 2024
1 parent a49737f commit 66edeab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/routes/bitcoin_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl Page {
Message::FailedToLoadFederationConfigFromInviteCode { config_invite_code } => {
let Subroute::Add(Add {
parsed_federation_invite_code_state_or,
nip_87_data_or,
..
}) = &mut self.subroute
else {
Expand All @@ -170,6 +171,18 @@ impl Page {
}
}

if let Some(Loadable::Loaded(nip_87_data)) = nip_87_data_or {
for (_, invite_codes) in nip_87_data.values_mut() {
for invite_code in invite_codes {
if invite_code.invite_code == config_invite_code
&& invite_code.loadable_federation_config == Loadable::Loading
{
invite_code.loadable_federation_config = Loadable::Failed;
}
}
}
}

Task::none()
}
Message::LoadNip87Federations => {
Expand Down

0 comments on commit 66edeab

Please sign in to comment.