Simplify Kotlin Wallet api

This commit is contained in:
Steve Myers 2021-06-24 13:49:25 -07:00
parent af828efa93
commit 13e7217ffd

View File

@ -129,13 +129,12 @@ fn get_wallet_ok<'lt>(wallet_result: &'lt WalletResult) -> Option<Box<WalletRef<
.raw .raw
.as_ref() .as_ref()
.ok() .ok()
.map(|w| Box::new(WalletRef { raw: w})) .map(|w| Box::new(WalletRef { raw: w }))
} }
#[ffi_export] #[ffi_export]
fn sync_wallet<'lt>(wallet_ref: &'lt WalletRef<'lt>) -> Box<VoidResult> { fn sync_wallet<'lt>(wallet_ref: &'lt WalletRef<'lt>) -> Box<VoidResult> {
let void_result = wallet_ref let void_result = wallet_ref.raw.sync(log_progress(), Some(100));
.raw.sync(log_progress(), Some(100));
Box::new(VoidResult { raw: void_result }) Box::new(VoidResult { raw: void_result })
} }