diff --git a/mm2src/mm2_main/src/lp_swap.rs b/mm2src/mm2_main/src/lp_swap.rs index 5bcfd5c9b9..f3bb501e40 100644 --- a/mm2src/mm2_main/src/lp_swap.rs +++ b/mm2src/mm2_main/src/lp_swap.rs @@ -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, } }