-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(swap): implement 0 dexfee for kmd trading pairs #2323
base: dev
Are you sure you want to change the base?
Conversation
let fee_coin = match &self.coin_type { | ||
EthCoinType::Eth => self.ticker.to_owned(), | ||
EthCoinType::Erc20 { platform, .. } => platform.to_owned(), | ||
EthCoinType::Nft { .. } => return MmError::err(TradePreimageError::NftProtocolNotSupported), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use platform_ticker
instead. I am not sure if you intentionally drop the nft support, but if we want to do that we need to add a if check before using platform_ticker
.
/// Check and return true if DexFee is not required to trade otherwise return false. | ||
pub fn no_fee(&self) -> bool { matches!(self, Self::Zero) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Check and return true if DexFee is not required to trade otherwise return false. | |
pub fn no_fee(&self) -> bool { matches!(self, Self::Zero) } | |
/// Check and return true if DexFee is not required to trade otherwise return false. | |
pub fn zero_fee(&self) -> bool { matches!(self, Self::Zero) } |
#2321