gui: adapt to latest change in lianad API
This commit is contained in:
parent
339cf5d8fa
commit
3250d8dc87
@ -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,
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user