no fees when same mint

This commit is contained in:
9qeklajc
2026-03-23 20:10:19 +01:00
parent 8a1f909083
commit 3dae03d731
+4 -1
View File
@@ -84,7 +84,10 @@ async def swap_to_primary_mint(
amount_msat = token_amount
else:
raise ValueError("Invalid unit")
estimated_fee_sat = math.ceil(max(amount_msat // 1000 * 0.01, 2)) + 1
if token_obj.mint != settings.primary_mint:
estimated_fee_sat = math.ceil(max(amount_msat // 1000 * 0.01, 2)) + 1
else:
estimated_fee_sat = 0
amount_msat_after_fee = amount_msat - estimated_fee_sat * 1000
primary_wallet = await get_wallet(settings.primary_mint, settings.primary_mint_unit)