From 2f14c3c1e867eff785b5417a72bacedf17df5022 Mon Sep 17 00:00:00 2001 From: Andrei Gubarev <1062334+agubarev@users.noreply.github.com> Date: Fri, 8 Jul 2022 11:42:22 +0300 Subject: [PATCH] fix: fixed bug in wallet_coin_join (#4290) Description --- `wallet_coin_join` was calling a wrong service function. Motivation and Context --- How Has This Been Tested? --- unit tests --- base_layer/wallet_ffi/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/base_layer/wallet_ffi/src/lib.rs b/base_layer/wallet_ffi/src/lib.rs index 97bc61e164..caf60dd955 100644 --- a/base_layer/wallet_ffi/src/lib.rs +++ b/base_layer/wallet_ffi/src/lib.rs @@ -4704,20 +4704,18 @@ pub unsafe extern "C" fn wallet_coin_join( }, }; - match (*wallet).runtime.block_on( - (*wallet) - .wallet - .output_manager_service - .create_coin_join(commitments, fee_per_gram.into()), - ) { - Ok((tx_id, _, _)) => { + match (*wallet) + .runtime + .block_on((*wallet).wallet.coin_join(commitments, fee_per_gram.into(), None)) + { + Ok(tx_id) => { ptr::replace(error_ptr, 0); tx_id.as_u64() }, Err(e) => { error!(target: LOG_TARGET, "failed to join outputs: {:#?}", e); - ptr::replace(error_ptr, LibWalletError::from(WalletError::OutputManagerError(e)).code); + ptr::replace(error_ptr, LibWalletError::from(e).code); 0 }, }