Skip to content

Commit 30ab852

Browse files
authored
refactor: use macros for Condition
1 parent f0f2e7a commit 30ab852

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bdk-ffi/src/bdk.udl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,7 @@ interface Satisfaction {
361361
None(string msg);
362362
};
363363

364-
dictionary Condition {
365-
u32? csv;
366-
LockTime? timelock;
367-
};
364+
typedef record Condition;
368365

369366
// ------------------------------------------------------------------------
370367
// bdk_wallet crate - bitcoin re-exports

bdk-ffi/src/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,12 @@ impl From<BdkSatisfaction> for Satisfaction {
569569
}
570570
}
571571

572-
#[derive(Debug, Clone)]
572+
/// An extra condition that must be satisfied but that is out of control of the user
573+
#[derive(Debug, Clone, uniffi::Record)]
573574
pub struct Condition {
575+
/// Optional CheckSequenceVerify condition
574576
pub csv: Option<u32>,
577+
/// Optional timelock condition
575578
pub timelock: Option<LockTime>,
576579
}
577580

0 commit comments

Comments
 (0)