Skip to content

Commit 3bb94e4

Browse files
committed
feat(wallet): generalize add_recipient to accept Address
1 parent a4978af commit 3bb94e4

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
@@ -582,8 +582,12 @@ impl<'a, Cs> TxBuilder<'a, Cs> {
582582
}
583583

584584
/// Add a recipient to the internal list
585-
pub fn add_recipient(&mut self, script_pubkey: ScriptBuf, amount: Amount) -> &mut Self {
586-
self.params.recipients.push((script_pubkey, amount));
585+
pub fn add_recipient(
586+
&mut self,
587+
script_pubkey: impl Into<ScriptBuf>,
588+
amount: Amount,
589+
) -> &mut Self {
590+
self.params.recipients.push((script_pubkey.into(), amount));
587591
self
588592
}
589593

0 commit comments

Comments
 (0)