We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d43651 commit 51c183aCopy full SHA for 51c183a
bdk-ffi/src/bitcoin.rs
@@ -121,6 +121,7 @@ impl HashableOutPoint {
121
/// This is an integer type representing fee rate in sat/kwu. It provides protection against mixing
122
/// up the types as well as basic formatting features.
123
#[derive(Clone, Debug, uniffi::Object)]
124
+#[uniffi::export(Display)]
125
pub struct FeeRate(pub BdkFeeRate);
126
127
#[uniffi::export]
@@ -157,6 +158,12 @@ impl FeeRate {
157
158
}
159
160
161
+impl Display for FeeRate {
162
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
163
+ write!(f, "{} sat/kwu", self.0)
164
+ }
165
+}
166
+
167
impl_from_core_type!(BdkFeeRate, FeeRate);
168
impl_into_core_type!(FeeRate, BdkFeeRate);
169
0 commit comments