Skip to content

Commit

Permalink
fix: fixed bug in wallet_coin_join (#4290)
Browse files Browse the repository at this point in the history
Description
---
`wallet_coin_join` was calling a wrong service function.

Motivation and Context
---

How Has This Been Tested?
---
unit tests
  • Loading branch information
agubarev committed Jul 8, 2022
1 parent 7e8e859 commit 2f14c3c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions base_layer/wallet_ffi/src/lib.rs
Expand Up @@ -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
},
}
Expand Down

0 comments on commit 2f14c3c

Please sign in to comment.