Skip to content

Commit ff6c2e3

Browse files
fixes
1 parent 3e3bb60 commit ff6c2e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

key-wallet-ffi/include/key_wallet_ffi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2274,7 +2274,7 @@ FFIManagedAccountResult managed_wallet_get_top_up_account_with_registration_inde
22742274
22752275
- `account` must be a valid pointer to an FFIManagedAccount instance
22762276
*/
2277-
FFINetworks managed_account_get_network(const FFIManagedAccount *account) ;
2277+
FFINetwork managed_account_get_network(const FFIManagedAccount *account) ;
22782278

22792279
/*
22802280
Get the parent wallet ID of a managed account

key-wallet-ffi/src/managed_account.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::sync::Arc;
99

1010
use crate::address_pool::{FFIAddressPool, FFIAddressPoolType};
1111
use crate::error::{FFIError, FFIErrorCode};
12-
use crate::types::{FFIAccountType, FFINetwork, FFINetworks};
12+
use crate::types::{FFIAccountType, FFINetwork};
1313
use crate::wallet_manager::FFIWalletManager;
1414
use key_wallet::managed_account::address_pool::AddressPool;
1515
use key_wallet::managed_account::ManagedAccount;
@@ -298,9 +298,9 @@ pub unsafe extern "C" fn managed_wallet_get_top_up_account_with_registration_ind
298298
#[no_mangle]
299299
pub unsafe extern "C" fn managed_account_get_network(
300300
account: *const FFIManagedAccount,
301-
) -> FFINetworks {
301+
) -> FFINetwork {
302302
if account.is_null() {
303-
return FFINetworks::NoNetworks;
303+
return FFINetwork::Dash;
304304
}
305305

306306
let account = &*account;
@@ -1018,7 +1018,7 @@ mod tests {
10181018

10191019
// Test get_network
10201020
let network = managed_account_get_network(account);
1021-
assert_eq!(network, FFINetworks::TestnetFlag);
1021+
assert_eq!(network, FFINetwork::Testnet);
10221022

10231023
// Test get_account_type
10241024
let mut index_out: c_uint = 999; // Initialize with unexpected value
@@ -1069,7 +1069,7 @@ mod tests {
10691069
unsafe {
10701070
// Test null account
10711071
let network = managed_account_get_network(ptr::null());
1072-
assert_eq!(network, FFINetworks::NoNetworks);
1072+
assert_eq!(network, FFINetwork::Dash);
10731073

10741074
let mut index_out: c_uint = 0;
10751075
let account_type = managed_account_get_account_type(ptr::null(), &mut index_out);

0 commit comments

Comments
 (0)