From de2c44fc183b3b43816cfe6c868c8cea7d749d7b Mon Sep 17 00:00:00 2001 From: Rob N Date: Sun, 16 Feb 2025 09:37:12 -1000 Subject: [PATCH] feat(wallet): generalize `add_recipient` to accept `Address` --- crates/wallet/src/wallet/tx_builder.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/wallet/src/wallet/tx_builder.rs b/crates/wallet/src/wallet/tx_builder.rs index 235987fc..7d693761 100644 --- a/crates/wallet/src/wallet/tx_builder.rs +++ b/crates/wallet/src/wallet/tx_builder.rs @@ -602,8 +602,12 @@ impl<'a, Cs> TxBuilder<'a, Cs> { } /// Add a recipient to the internal list - pub fn add_recipient(&mut self, script_pubkey: ScriptBuf, amount: Amount) -> &mut Self { - self.params.recipients.push((script_pubkey, amount)); + pub fn add_recipient( + &mut self, + script_pubkey: impl Into, + amount: Amount, + ) -> &mut Self { + self.params.recipients.push((script_pubkey.into(), amount)); self } -- 2.49.0