From ed023922aa5ada0d4ff592279e2a4bad1453e514 Mon Sep 17 00:00:00 2001 From: laruh Date: Tue, 5 Nov 2024 12:44:23 +0700 Subject: [PATCH] review: update payment state index consts names --- mm2src/coins/eth/eth_swap_v2/eth_maker_swap_v2.rs | 4 ++-- mm2src/coins/eth/eth_swap_v2/eth_taker_swap_v2.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mm2src/coins/eth/eth_swap_v2/eth_maker_swap_v2.rs b/mm2src/coins/eth/eth_swap_v2/eth_maker_swap_v2.rs index 6a52fa3fa4..8837b8ce0d 100644 --- a/mm2src/coins/eth/eth_swap_v2/eth_maker_swap_v2.rs +++ b/mm2src/coins/eth/eth_swap_v2/eth_maker_swap_v2.rs @@ -25,7 +25,7 @@ const ERC20_MAKER_PAYMENT: &str = "erc20MakerPayment"; /// uint32 paymentLockTime; /// MakerPaymentState state; /// } -const MAKER_PAYMENT_STATE_INDX: usize = 2; +const MAKER_PAYMENT_STATE_INDEX: usize = 2; struct MakerPaymentArgs { taker_address: Address, @@ -142,7 +142,7 @@ impl EthCoin { Token::FixedBytes(swap_id.clone()), &MAKER_SWAP_V2, EthPaymentType::MakerPayments, - MAKER_PAYMENT_STATE_INDX, + MAKER_PAYMENT_STATE_INDEX, ) .await?; diff --git a/mm2src/coins/eth/eth_swap_v2/eth_taker_swap_v2.rs b/mm2src/coins/eth/eth_swap_v2/eth_taker_swap_v2.rs index fe07ab9953..8dd686e064 100644 --- a/mm2src/coins/eth/eth_swap_v2/eth_taker_swap_v2.rs +++ b/mm2src/coins/eth/eth_swap_v2/eth_taker_swap_v2.rs @@ -29,7 +29,7 @@ const TAKER_PAYMENT_APPROVE: &str = "takerPaymentApprove"; /// uint32 paymentLockTime; /// TakerPaymentState state; /// } -const TAKER_PAYMENT_STATE_INDX: usize = 3; +const TAKER_PAYMENT_STATE_INDEX: usize = 3; struct TakerFundingArgs { dex_fee: U256, @@ -164,7 +164,7 @@ impl EthCoin { Token::FixedBytes(swap_id.clone()), &TAKER_SWAP_V2, EthPaymentType::TakerPayments, - TAKER_PAYMENT_STATE_INDX, + TAKER_PAYMENT_STATE_INDEX, ) .await?; @@ -241,7 +241,7 @@ impl EthCoin { decoded[0].clone(), &TAKER_SWAP_V2, EthPaymentType::TakerPayments, - TAKER_PAYMENT_STATE_INDX, + TAKER_PAYMENT_STATE_INDEX, ) .await ); @@ -398,7 +398,7 @@ impl EthCoin { decoded[0].clone(), // id from takerPaymentApprove &TAKER_SWAP_V2, EthPaymentType::TakerPayments, - TAKER_PAYMENT_STATE_INDX, + TAKER_PAYMENT_STATE_INDEX, ) .await .map_err(|e| SearchForFundingSpendErr::Internal(ERRL!("{}", e)))?; @@ -430,7 +430,7 @@ impl EthCoin { decoded[0].clone(), &TAKER_SWAP_V2, EthPaymentType::TakerPayments, - TAKER_PAYMENT_STATE_INDX, + TAKER_PAYMENT_STATE_INDEX, ) .await ); @@ -473,7 +473,7 @@ impl EthCoin { decoded[0].clone(), // id from spendTakerPayment &TAKER_SWAP_V2, EthPaymentType::TakerPayments, - TAKER_PAYMENT_STATE_INDX, + TAKER_PAYMENT_STATE_INDEX, ) .await?; if taker_status == U256::from(TakerPaymentStateV2::MakerSpent as u8) {