From 3dae03d731efb5a46cc13dcfff7ea035175039b3 Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Mon, 23 Mar 2026 20:10:19 +0100 Subject: [PATCH] no fees when same mint --- routstr/wallet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routstr/wallet.py b/routstr/wallet.py index a1f90af0..76372f75 100644 --- a/routstr/wallet.py +++ b/routstr/wallet.py @@ -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)