diff --git a/gui/src/app/state/coins.rs b/gui/src/app/state/coins.rs index 05a3e27c..e01d4f09 100644 --- a/gui/src/app/state/coins.rs +++ b/gui/src/app/state/coins.rs @@ -35,7 +35,7 @@ impl CoinsPanel { .iter() .filter_map(|coin| { if coin.spend_info.is_none() { - Some(*coin) + Some(coin.clone()) } else { None } @@ -129,6 +129,10 @@ mod tests { "f7bd1b2a995b689d326e51eb742eb1088c4a8f110d9cb56128fd553acc9f88e5", ) .unwrap(); + let dummy_address = + bitcoin::Address::from_str("bc1qvrl2849aggm6qry9ea7xqp2kk39j8vaa8r3cwg") + .unwrap() + .assume_checked(); panel.update_coins(&[ Coin { @@ -137,6 +141,7 @@ mod tests { block_height: Some(3), spend_info: None, is_immature: false, + address: dummy_address.clone(), }, Coin { outpoint: bitcoin::OutPoint { txid, vout: 3 }, @@ -144,6 +149,7 @@ mod tests { block_height: None, spend_info: None, is_immature: false, + address: dummy_address.clone(), }, Coin { outpoint: bitcoin::OutPoint { txid, vout: 0 }, @@ -151,6 +157,7 @@ mod tests { block_height: Some(2), spend_info: None, is_immature: false, + address: dummy_address.clone(), }, Coin { outpoint: bitcoin::OutPoint { txid, vout: 1 }, @@ -158,6 +165,7 @@ mod tests { block_height: Some(3), spend_info: None, is_immature: false, + address: dummy_address, }, ]); diff --git a/gui/src/app/state/recovery.rs b/gui/src/app/state/recovery.rs index 9f627885..5daecece 100644 --- a/gui/src/app/state/recovery.rs +++ b/gui/src/app/state/recovery.rs @@ -152,7 +152,7 @@ impl State for RecoveryPanel { .iter() .any(|input| input.previous_output == coin.outpoint) }) - .copied() + .cloned() .collect(); let sigs = desc.partial_spend_info(&psbt).unwrap(); Ok(SpendTx::new(None, psbt, coins, sigs)) diff --git a/gui/src/app/state/spend/step.rs b/gui/src/app/state/spend/step.rs index a806b9ba..00d226a2 100644 --- a/gui/src/app/state/spend/step.rs +++ b/gui/src/app/state/spend/step.rs @@ -75,7 +75,7 @@ impl DefineSpend { .iter() .filter_map(|c| { if c.spend_info.is_none() { - Some((*c, false)) + Some((c.clone(), false)) } else { None } @@ -302,7 +302,7 @@ impl Step for DefineSpend { draft.inputs = self .coins .iter() - .filter_map(|(coin, selected)| if *selected { Some(*coin) } else { None }) + .filter_map(|(coin, selected)| if *selected { Some(coin.clone()) } else { None }) .collect(); draft.generated = self.generated.clone(); } diff --git a/gui/src/daemon/mod.rs b/gui/src/daemon/mod.rs index 6640a44c..8b3a9426 100644 --- a/gui/src/daemon/mod.rs +++ b/gui/src/daemon/mod.rs @@ -90,7 +90,7 @@ pub trait Daemon: Debug { .iter() .any(|input| input.previous_output == coin.outpoint) }) - .copied() + .cloned() .collect(); let sigs = info .descriptors @@ -133,7 +133,7 @@ pub trait Daemon: Debug { .iter() .any(|input| input.previous_output == coin.outpoint) { - tx_coins.push(*coin); + tx_coins.push(coin.clone()); } } model::HistoryTransaction::new(tx.tx, tx.height, tx.time, tx_coins, change_indexes) @@ -171,7 +171,7 @@ pub trait Daemon: Debug { .iter() .any(|input| input.previous_output == coin.outpoint) { - tx_coins.push(*coin); + tx_coins.push(coin.clone()); } } model::HistoryTransaction::new(tx.tx, tx.height, tx.time, tx_coins, change_indexes)