Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
r2st committed Apr 2, 2024
1 parent ac8cc07 commit 53e24bc
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions mm2src/mm2_main/src/lp_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1668,17 +1668,15 @@ impl SecretHashAlgo {
#[cfg(not(target_arch = "wasm32"))]
pub fn detect_secret_hash_algo(maker_coin: &MmCoinEnum, taker_coin: &MmCoinEnum) -> SecretHashAlgo {
match (maker_coin, taker_coin) {
(
MmCoinEnum::Tendermint(_)
| MmCoinEnum::TendermintToken(_)
| MmCoinEnum::LightningCoin(_)
| MmCoinEnum::SolanaCoin(_),
_,
) => SecretHashAlgo::SHA256,
// If taker is lightning coin the SHA256 of the secret will be sent as part of the maker signed invoice
(_, MmCoinEnum::Tendermint(_) | MmCoinEnum::TendermintToken(_) | MmCoinEnum::SolanaCoin(_)) => {
(MmCoinEnum::Tendermint(_) | MmCoinEnum::TendermintToken(_) | MmCoinEnum::LightningCoin(_), _) => {
SecretHashAlgo::SHA256
},
#[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
(MmCoinEnum::SolanaCoin(_), _) => SecretHashAlgo::SHA256,
// If taker is lightning coin the SHA256 of the secret will be sent as part of the maker signed invoice
(_, MmCoinEnum::Tendermint(_) | MmCoinEnum::TendermintToken(_)) => SecretHashAlgo::SHA256,
#[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
(_, MmCoinEnum::SolanaCoin(_)) => SecretHashAlgo::SHA256,
(_, _) => SecretHashAlgo::DHASH160,
}
}
Expand Down

0 comments on commit 53e24bc

Please sign in to comment.