Skip to content

Commit 0ffb921

Browse files
authored
feat: implement display for Transaction
1 parent f99a1d1 commit 0ffb921

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bdk-ffi/src/bitcoin.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ impl_into_core_type!(Address, BdkAddress);
321321
/// Bitcoin transaction.
322322
/// An authenticated movement of coins.
323323
#[derive(Debug, Clone, PartialEq, Eq, uniffi::Object)]
324+
#[uniffi::export(Eq, Display)]
324325
pub struct Transaction(BdkTransaction);
325326

326327
#[uniffi::export]
@@ -464,6 +465,12 @@ impl From<&Transaction> for BdkTransaction {
464465
}
465466
}
466467

468+
impl Display for Transaction {
469+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
470+
write!(f, "{:?}", self.0)
471+
}
472+
}
473+
467474
/// A Partially Signed Transaction.
468475
#[derive(uniffi::Object)]
469476
pub struct Psbt(pub(crate) Mutex<BdkPsbt>);

0 commit comments

Comments
 (0)