Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 34165c5

Browse files
committed
Make NodeManager optional
1 parent 2ba3942 commit 34165c5

File tree

7 files changed

+956
-439
lines changed

7 files changed

+956
-439
lines changed

mutiny-core/src/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ pub enum MutinyError {
179179
/// Failed to connect to a federation.
180180
#[error("Failed to connect to a federation.")]
181181
FederationConnectionFailed,
182+
/// A node manager has not been created yet.
183+
#[error("A node manager has not been created yet.")]
184+
NodeManagerRequired,
182185
#[error(transparent)]
183186
Other(anyhow::Error),
184187
}
@@ -263,6 +266,7 @@ impl PartialEq for MutinyError {
263266
(Self::TokenAlreadySpent, Self::TokenAlreadySpent) => true,
264267
(Self::FederationRequired, Self::FederationRequired) => true,
265268
(Self::FederationConnectionFailed, Self::FederationConnectionFailed) => true,
269+
(Self::NodeManagerRequired, Self::NodeManagerRequired) => true,
266270
(Self::Other(e), Self::Other(e2)) => e.to_string() == e2.to_string(),
267271
_ => false,
268272
}

mutiny-core/src/labels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::error::MutinyError;
2-
use crate::nodemanager::NodeManager;
32
use crate::storage::MutinyStorage;
3+
use crate::MutinyWallet;
44
use bitcoin::Address;
55
use lightning_invoice::Bolt11Invoice;
66
use lnurl::lightning_address::LightningAddress;
@@ -445,7 +445,7 @@ impl<S: MutinyStorage> LabelStorage for S {
445445
}
446446
}
447447

448-
impl<S: MutinyStorage> LabelStorage for NodeManager<S> {
448+
impl<S: MutinyStorage> LabelStorage for MutinyWallet<S> {
449449
fn get_address_labels(&self) -> Result<HashMap<String, Vec<String>>, MutinyError> {
450450
self.storage.get_address_labels()
451451
}

0 commit comments

Comments
 (0)