Skip to content

Commit f00fb2e

Browse files
authored
chore: drop unused utxo.rs in key-wallet crate (#304)
1 parent 1df1148 commit f00fb2e

File tree

3 files changed

+7
-224
lines changed

3 files changed

+7
-224
lines changed

key-wallet-ffi/src/utxo.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! UTXO management
22
3+
use crate::error::{FFIError, FFIErrorCode};
4+
use crate::managed_wallet::FFIManagedWalletInfo;
5+
use key_wallet::wallet::managed_wallet_info::wallet_info_interface::WalletInfoInterface;
36
use std::ffi::CString;
47
use std::os::raw::c_char;
58
use std::ptr;
69

7-
use crate::error::{FFIError, FFIErrorCode};
8-
use crate::managed_wallet::FFIManagedWalletInfo;
9-
1010
/// UTXO structure for FFI
1111
#[repr(C)]
1212
pub struct FFIUTXO {
@@ -99,7 +99,7 @@ pub unsafe extern "C" fn managed_wallet_get_utxos(
9999
let managed_info = &*managed_info;
100100

101101
// Get UTXOs from the managed wallet info
102-
let utxos = managed_info.inner().get_utxos();
102+
let utxos = managed_info.inner().utxos();
103103

104104
if utxos.is_empty() {
105105
*count_out = 0;
@@ -108,10 +108,10 @@ pub unsafe extern "C" fn managed_wallet_get_utxos(
108108
// Convert UTXOs to FFI format
109109
let mut ffi_utxos = Vec::with_capacity(utxos.len());
110110

111-
for (outpoint, utxo) in utxos {
111+
for utxo in utxos {
112112
// Convert txid to byte array
113113
let mut txid_bytes = [0u8; 32];
114-
txid_bytes.copy_from_slice(&outpoint.txid[..]);
114+
txid_bytes.copy_from_slice(&utxo.outpoint.txid[..]);
115115

116116
// Convert address to string
117117
let address_str = utxo.address.to_string();
@@ -128,7 +128,7 @@ pub unsafe extern "C" fn managed_wallet_get_utxos(
128128

129129
let ffi_utxo = FFIUTXO::new(
130130
txid_bytes,
131-
outpoint.vout,
131+
utxo.outpoint.vout,
132132
utxo.value(),
133133
address_str,
134134
script_bytes,

key-wallet/src/wallet/managed_wallet_info/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub mod managed_account_operations;
1010
pub mod managed_accounts;
1111
pub mod transaction_builder;
1212
pub mod transaction_building;
13-
pub mod utxo;
1413
pub mod wallet_info_interface;
1514

1615
pub use managed_account_operations::ManagedAccountOperations;

key-wallet/src/wallet/managed_wallet_info/utxo.rs

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)