Skip to content
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

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

borngraced
Copy link
Member

@borngraced borngraced self-assigned this Jan 16, 2025
@borngraced borngraced changed the title feat:(swap) implement 0 dexfee for kmd trading pairs feat(swap) implement 0 dexfee for kmd trading pairs Jan 16, 2025
@borngraced borngraced changed the title feat(swap) implement 0 dexfee for kmd trading pairs feat(swap): implement 0 dexfee for kmd trading pairs Jan 16, 2025
Comment on lines +5894 to +5898
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),
};
Copy link
Member

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.

Comment on lines +3684 to +3685
/// Check and return true if DexFee is not required to trade otherwise return false.
pub fn no_fee(&self) -> bool { matches!(self, Self::Zero) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants