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

Commit 74115d1

Browse files
Remove excess on chain sweep parameters
1 parent d5982f0 commit 74115d1

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

mutiny-core/src/nodemanager.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,12 +1514,10 @@ impl<S: MutinyStorage> NodeManager<S> {
15141514
/// The UTXOs must all exist in the wallet.
15151515
pub async fn sweep_utxos_to_channel(
15161516
&self,
1517-
user_chan_id: Option<u128>,
1518-
self_node_pubkey: Option<&PublicKey>,
15191517
utxos: &[OutPoint],
15201518
to_pubkey: Option<PublicKey>,
15211519
) -> Result<MutinyChannel, MutinyError> {
1522-
let node = self.get_node_by_key_or_first(self_node_pubkey).await?;
1520+
let node = self.get_node_by_key_or_first(None).await?;
15231521
let to_pubkey = match to_pubkey {
15241522
Some(pubkey) => pubkey,
15251523
None => node
@@ -1530,7 +1528,7 @@ impl<S: MutinyStorage> NodeManager<S> {
15301528
};
15311529

15321530
let outpoint = node
1533-
.sweep_utxos_to_channel_with_timeout(user_chan_id, utxos, to_pubkey, 60)
1531+
.sweep_utxos_to_channel_with_timeout(None, utxos, to_pubkey, 60)
15341532
.await?;
15351533

15361534
let all_channels = node.channel_manager.list_channels();
@@ -1550,8 +1548,6 @@ impl<S: MutinyStorage> NodeManager<S> {
15501548
/// The node must be online and have a connection to the peer.
15511549
pub async fn sweep_all_to_channel(
15521550
&self,
1553-
user_chan_id: Option<u128>,
1554-
from_node: Option<&PublicKey>,
15551551
to_pubkey: Option<PublicKey>,
15561552
) -> Result<MutinyChannel, MutinyError> {
15571553
let utxos = self
@@ -1560,8 +1556,7 @@ impl<S: MutinyStorage> NodeManager<S> {
15601556
.map(|u| u.outpoint)
15611557
.collect::<Vec<_>>();
15621558

1563-
self.sweep_utxos_to_channel(user_chan_id, from_node, &utxos, to_pubkey)
1564-
.await
1559+
self.sweep_utxos_to_channel(&utxos, to_pubkey).await
15651560
}
15661561

15671562
/// Closes a channel with the given outpoint.

mutiny-wasm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ impl MutinyWallet {
971971
Ok(self
972972
.inner
973973
.node_manager
974-
.sweep_all_to_channel(None, None, to_pubkey)
974+
.sweep_all_to_channel(to_pubkey)
975975
.await?
976976
.into())
977977
}

0 commit comments

Comments
 (0)