Skip to content

Commit

Permalink
review: move SpendTxSearchParams up
Browse files Browse the repository at this point in the history
  • Loading branch information
laruh committed Dec 27, 2024
1 parent 43a0b8b commit 49f46e0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions mm2src/coins/eth/eth_swap_v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ pub(crate) enum PrepareTxDataError {
Internal(String),
}

pub(crate) struct SpendTxSearchParams<'a> {
pub(crate) swap_contract_address: Address,
pub(crate) event_name: &'a str,
pub(crate) abi_contract: &'a Contract,
pub(crate) swap_id: &'a [u8; 32],
pub(crate) from_block: u64,
pub(crate) wait_until: u64,
pub(crate) check_every: f64,
}

impl EthCoin {
/// Retrieves the payment status from a given smart contract address based on the swap ID and state type.
pub(crate) async fn payment_status_v2(
Expand Down Expand Up @@ -216,16 +226,6 @@ impl EthCoin {
}
}

pub(crate) struct SpendTxSearchParams<'a> {
pub(crate) swap_contract_address: Address,
pub(crate) event_name: &'a str,
pub(crate) abi_contract: &'a Contract,
pub(crate) swap_id: &'a [u8; 32],
pub(crate) from_block: u64,
pub(crate) wait_until: u64,
pub(crate) check_every: f64,
}

pub(crate) fn validate_payment_state(
tx: &SignedEthTx,
state: U256,
Expand Down

0 comments on commit 49f46e0

Please sign in to comment.