Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mmrrnn committed Jan 15, 2025
1 parent 1ffb174 commit 0dab7b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

use std::{
convert::{TryFrom, TryInto},
ops::Deref,
str::FromStr,
};

Expand Down
9 changes: 3 additions & 6 deletions base_layer/wallet/tests/transaction_service_tests/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3308,8 +3308,7 @@ async fn test_transaction_cancellation() {
.await
.unwrap()
.iter()
.find(|tx| tx.tx_id == tx_id)
.is_none());
.any(|tx| tx.tx_id == tx_id));

let key_manager = create_memory_db_key_manager().unwrap();
let input = create_wallet_output_with_data(
Expand Down Expand Up @@ -3398,8 +3397,7 @@ async fn test_transaction_cancellation() {
.await
.unwrap()
.iter()
.find(|tx| tx.tx_id == tx_id2)
.is_none());
.any(|tx| tx.tx_id == tx_id2));

// Lets cancel the last one using a Comms stack message
let input = create_wallet_output_with_data(
Expand Down Expand Up @@ -3526,8 +3524,7 @@ async fn test_transaction_cancellation() {
.await
.unwrap()
.iter()
.find(|tx| tx.tx_id == tx_id3)
.is_none());
.any(|tx| tx.tx_id == tx_id3));
}
#[tokio::test]
async fn test_direct_vs_saf_send_of_tx_reply_and_finalize() {
Expand Down
10 changes: 5 additions & 5 deletions base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7695,7 +7695,7 @@ pub unsafe extern "C" fn wallet_get_pending_inbound_transactions(

match pending_transactions {
Ok(pending_transactions) => {
for tx in pending_transactions.iter() {
for tx in &pending_transactions {
pending.push(tx.clone());
}

Expand Down Expand Up @@ -7765,7 +7765,7 @@ pub unsafe extern "C" fn wallet_get_pending_outbound_transactions(
.block_on((*wallet).wallet.transaction_service.get_pending_outbound_transactions());
match pending_transactions {
Ok(pending_transactions) => {
for tx in pending_transactions.iter() {
for tx in &pending_transactions {
pending.push(tx.clone());
}
if let Ok(completed_txs) = (*wallet)
Expand Down Expand Up @@ -7864,7 +7864,7 @@ pub unsafe extern "C" fn wallet_get_cancelled_transactions(
};

let mut completed = Vec::new();
for tx in completed_transactions.iter() {
for tx in &completed_transactions {
completed.push(tx.clone());
}
let runtime = match Runtime::new() {
Expand All @@ -7883,12 +7883,12 @@ pub unsafe extern "C" fn wallet_get_cancelled_transactions(
return ptr::null_mut();
},
};
for tx in inbound_transactions.iter() {
for tx in &inbound_transactions {
let mut inbound_tx = CompletedTransaction::from(tx.clone());
inbound_tx.destination_address = wallet_address.clone();
completed.push(inbound_tx);
}
for tx in outbound_transactions.iter() {
for tx in &outbound_transactions {
let mut outbound_tx = CompletedTransaction::from(tx.clone());
outbound_tx.source_address = wallet_address.clone();
completed.push(outbound_tx);
Expand Down

0 comments on commit 0dab7b7

Please sign in to comment.