Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make NodeManager optional #1142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Things to test before cutting a release:
- [ ] Enable diagnostics
- [ ] Join a fedimint
- [ ] Leave a fedimint and rejoin
- [ ] Create self custodial lightning
- [ ] Receive on lightning
- [ ] One with fedimint
- [ ] One that creates a channel
Expand All @@ -18,6 +19,8 @@ Things to test before cutting a release:
- [ ] Send on chain
- [ ] Swap to lightning
- [ ] Swap fedimint to lightning
- [ ] without self custodial initated
- [ ] with self custodial created
- [ ] Nostr Wallet Connect
- [ ] Auto approval
- [ ] Manual approval
Expand All @@ -34,6 +37,7 @@ Things to test before cutting a release:
- [ ] Mutual Close Channel
- [ ] Known Issue: balance will be double counted until 6 confirmations
- [ ] Force Close Channel
- [ ] Wallet with no balances or fedimint takes you to add fedimint screen
- [ ] Get Mutiny+
- [ ] Test lightning address payments
- [ ] Change to Zeus LSP (https://mutinynet-flow.lnolymp.us)
Expand Down
4 changes: 4 additions & 0 deletions mutiny-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ pub enum MutinyError {
/// Failed to connect to a federation.
#[error("Failed to connect to a federation.")]
FederationConnectionFailed,
/// A node manager has not been created yet.
#[error("A node manager has not been created yet.")]
NodeManagerRequired,
#[error(transparent)]
Other(anyhow::Error),
}
Expand Down Expand Up @@ -263,6 +266,7 @@ impl PartialEq for MutinyError {
(Self::TokenAlreadySpent, Self::TokenAlreadySpent) => true,
(Self::FederationRequired, Self::FederationRequired) => true,
(Self::FederationConnectionFailed, Self::FederationConnectionFailed) => true,
(Self::NodeManagerRequired, Self::NodeManagerRequired) => true,
(Self::Other(e), Self::Other(e2)) => e.to_string() == e2.to_string(),
_ => false,
}
Expand Down
4 changes: 2 additions & 2 deletions mutiny-core/src/labels.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::error::MutinyError;
use crate::nodemanager::NodeManager;
use crate::storage::MutinyStorage;
use crate::MutinyWallet;
use bitcoin::Address;
use lightning_invoice::Bolt11Invoice;
use lnurl::lightning_address::LightningAddress;
Expand Down Expand Up @@ -445,7 +445,7 @@ impl<S: MutinyStorage> LabelStorage for S {
}
}

impl<S: MutinyStorage> LabelStorage for NodeManager<S> {
impl<S: MutinyStorage> LabelStorage for MutinyWallet<S> {
fn get_address_labels(&self) -> Result<HashMap<String, Vec<String>>, MutinyError> {
self.storage.get_address_labels()
}
Expand Down
Loading
Loading