Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions mm2src/coins/eth/fee_estimation/eip1559/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ use url::Url;
pub(crate) const FEE_PRIORITY_LEVEL_N: usize = 3;

/// Indicates which provider was used to get fee per gas estimations
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub enum EstimationSource {
/// filled by default values
#[default]
Empty,
/// internal simple estimator
Simple,
Expand All @@ -30,12 +31,6 @@ impl std::fmt::Display for EstimationSource {
}
}

impl Default for EstimationSource {
fn default() -> Self {
Self::Empty
}
}

enum PriorityLevelId {
Low = 0,
Medium = 1,
Expand Down
9 changes: 2 additions & 7 deletions mm2src/coins/tendermint/tendermint_coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,21 +397,16 @@ impl RpcCommonOps for TendermintCoin {
}
}

#[derive(PartialEq)]
#[derive(Default, PartialEq)]
pub enum TendermintWalletConnectionType {
Wc(kdf_walletconnect::WcTopic),
WcLedger(kdf_walletconnect::WcTopic),
KeplrLedger,
Keplr,
#[default]
Native,
}

impl Default for TendermintWalletConnectionType {
fn default() -> Self {
Self::Native
}
}

pub struct TendermintCoinImpl {
ticker: String,
/// As seconds
Expand Down
3 changes: 2 additions & 1 deletion mm2src/mm2_main/src/lp_swap/maker_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,8 @@ impl MakerSwap {
}

async fn wait_for_taker_payment(&self) -> Result<(Option<MakerSwapCommand>, Vec<MakerSwapEvent>), String> {
const PAYMENT_MSG_INTERVAL_SEC: f64 = 600.;
/// Broadcast interval for maker payment message, reduced to ensure the iOS app can re-send or receive it while remaining in the foreground.
const PAYMENT_MSG_INTERVAL_SEC: f64 = 15.;
let payment_data_msg = match self.get_my_payment_data().await {
Ok(data) => data,
Err(e) => {
Expand Down
8 changes: 5 additions & 3 deletions mm2src/mm2_main/src/lp_swap/taker_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,9 @@ impl TakerSwap {
}

async fn wait_for_taker_payment_spend(&self) -> Result<(Option<TakerSwapCommand>, Vec<TakerSwapEvent>), String> {
const BROADCAST_MSG_INTERVAL_SEC: f64 = 600.;
const WATCHER_MSG_INTERVAL_SEC: f64 = 600.;
/// Broadcast interval for taker payment message, reduced to ensure the iOS app can re-send or receive it while remaining in the foreground.
const PAYMENT_MSG_INTERVAL_SEC: f64 = 15.;

let tx_hex = self.r().taker_payment.as_ref().unwrap().tx_hex.clone();
let mut watcher_broadcast_abort_handle = None;
Expand All @@ -1872,7 +1874,7 @@ impl TakerSwap {
self.ctx.clone(),
watcher_topic(&self.r().data.taker_coin),
swpmsg_watcher,
BROADCAST_MSG_INTERVAL_SEC,
WATCHER_MSG_INTERVAL_SEC,
Some(htlc_keypair),
));
}
Expand All @@ -1884,7 +1886,7 @@ impl TakerSwap {
self.ctx.clone(),
swap_topic(&self.uuid),
msg,
BROADCAST_MSG_INTERVAL_SEC,
PAYMENT_MSG_INTERVAL_SEC,
self.p2p_privkey,
);

Expand Down
Loading