Skip to content

Commit

Permalink
make WithdrawRequest one implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
shamardy committed Aug 10, 2024
1 parent 6d5bc8e commit 00ecbb6
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions mm2src/coins/lp_coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,21 @@ impl WithdrawRequest {
broadcast: false,
}
}

pub fn new_max(coin: String, to: String) -> WithdrawRequest {
WithdrawRequest {
coin,
from: None,
to,
amount: 0.into(),
max: true,
fee: None,
memo: None,
ibc_source_channel: None,
#[cfg(target_arch = "wasm32")]
broadcast: false,
}
}
}

#[derive(Debug, Deserialize)]
Expand Down Expand Up @@ -2138,23 +2153,6 @@ pub struct VerificationRequest {
address: String,
}

impl WithdrawRequest {
pub fn new_max(coin: String, to: String) -> WithdrawRequest {
WithdrawRequest {
coin,
from: None,
to,
amount: 0.into(),
max: true,
fee: None,
memo: None,
ibc_source_channel: None,
#[cfg(target_arch = "wasm32")]
broadcast: false,
}
}
}

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum StakingInfosDetails {
Expand Down

0 comments on commit 00ecbb6

Please sign in to comment.