mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 14:15:55 -04:00
fix(monero-sys): sweep_multi argument type switch to non-option
This commit is contained in:
parent
97d7996a64
commit
bb396ad3b5
2 changed files with 8 additions and 6 deletions
|
@ -503,14 +503,16 @@ impl MoneroWallet {
|
|||
/// Sweep multiple addresses with different ratios
|
||||
/// If the address is `None`, the address will be set to the primary address of the
|
||||
/// main wallet.
|
||||
pub async fn sweep_multi(&self, addresses: &[impl Into<Option<Address>> + Clone], ratios: &[f64]) -> Result<TxReceipt> {
|
||||
pub async fn sweep_multi(
|
||||
&self,
|
||||
addresses: &[Address],
|
||||
ratios: &[f64],
|
||||
) -> Result<TxReceipt> {
|
||||
tracing::info!("`{}` sweeping multi ({:?})", self.name, ratios);
|
||||
self.balance().await?;
|
||||
|
||||
let addresses: Vec<Option<Address>> = addresses.iter().map(|a| a.clone().into()).collect();
|
||||
|
||||
self.wallet
|
||||
.sweep_multi(&addresses, ratios)
|
||||
.sweep_multi(addresses, ratios)
|
||||
.await
|
||||
.context("Failed to perform sweep")?
|
||||
.into_iter()
|
||||
|
|
|
@ -440,7 +440,7 @@ impl WalletHandle {
|
|||
/// wallet
|
||||
pub async fn sweep_multi(
|
||||
&self,
|
||||
addresses: &[Option<monero::Address>],
|
||||
addresses: &[monero::Address],
|
||||
percentages: &[f64],
|
||||
) -> anyhow::Result<Vec<TxReceipt>> {
|
||||
tracing::debug!(addresses=?addresses, percentages=?percentages, "Sweeping multi");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue