Skip to content

Commit de2c44f

Browse files
rustaceanrobValuedMammal
authored andcommitted
feat(wallet): generalize add_recipient to accept Address
1 parent 63e62b4 commit de2c44f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/wallet/src/wallet/tx_builder.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,12 @@ impl<'a, Cs> TxBuilder<'a, Cs> {
602602
}
603603

604604
/// Add a recipient to the internal list
605-
pub fn add_recipient(&mut self, script_pubkey: ScriptBuf, amount: Amount) -> &mut Self {
606-
self.params.recipients.push((script_pubkey, amount));
605+
pub fn add_recipient(
606+
&mut self,
607+
script_pubkey: impl Into<ScriptBuf>,
608+
amount: Amount,
609+
) -> &mut Self {
610+
self.params.recipients.push((script_pubkey.into(), amount));
607611
self
608612
}
609613

0 commit comments

Comments
 (0)