From 7b89cc523671620ceda348211ec6e2e054748639 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Tue, 19 Mar 2024 15:28:46 +0100 Subject: [PATCH] f --- crates/erc20_payment_lib/src/runtime.rs | 7 +++---- crates/erc20_payment_lib/src/sender/service.rs | 7 ++++--- crates/erc20_payment_lib/src/signer/account.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/erc20_payment_lib/src/runtime.rs b/crates/erc20_payment_lib/src/runtime.rs index 9b5c48d5..a7a76adf 100644 --- a/crates/erc20_payment_lib/src/runtime.rs +++ b/crates/erc20_payment_lib/src/runtime.rs @@ -591,9 +591,9 @@ impl PaymentRuntime { for account in lock_shared_state.accounts.iter() { for jh in account.jh.lock().unwrap().iter().flatten() { - if !jh.is_finished() { - return true; - } + if !jh.is_finished() { + return true; + } } } false @@ -659,7 +659,6 @@ impl PaymentRuntime { options.clone(), ); payment_account.jh.lock().as_mut().unwrap().push(Some(jh)); - } sh.accounts.push(payment_account); diff --git a/crates/erc20_payment_lib/src/sender/service.rs b/crates/erc20_payment_lib/src/sender/service.rs index 0471025e..5a17779d 100644 --- a/crates/erc20_payment_lib/src/sender/service.rs +++ b/crates/erc20_payment_lib/src/sender/service.rs @@ -266,9 +266,10 @@ pub async fn process_transactions( let mut current_wait_time_no_gas_token: f64 = 0.0; loop { - let mut trans_option = get_next_transaction(conn, chain_id, &format!("{:#x}", signer_account.address)) - .await - .map_err(err_from!())?; + let mut trans_option = + get_next_transaction(conn, chain_id, &format!("{:#x}", signer_account.address)) + .await + .map_err(err_from!())?; let Some(tx) = trans_option.as_mut() else { log::debug!("No transactions to process, breaking from loop"); diff --git a/crates/erc20_payment_lib/src/signer/account.rs b/crates/erc20_payment_lib/src/signer/account.rs index 4a1b8cbf..1ec7c0e5 100644 --- a/crates/erc20_payment_lib/src/signer/account.rs +++ b/crates/erc20_payment_lib/src/signer/account.rs @@ -49,7 +49,7 @@ impl SignerAccount { if !jh.is_finished() { return true; } - } + } } false }