TODO Location
sixty_nuts/wallet.py:634
Priority
🟡 Medium Priority - Important for preventing failed transactions
Current Code
fee_reserve = melt_quote.get("fee_reserve", 0)
total_needed = invoice_amount + fee_reserve
# TODO: check if we have enough balance in the target mint with real fee calculation
What needs to be done
- Calculate actual fees including both Lightning fees and mint input fees
- Verify sufficient balance exists after accounting for all fees
- Prevent failed melts due to insufficient balance
Implementation
- Calculate mint input fees using
calculate_total_input_fees()
- Add Lightning fee reserve from melt quote
- Verify balance covers amount + all fees
- Trigger rebalancing if needed
TODO Location
sixty_nuts/wallet.py:634Priority
🟡 Medium Priority - Important for preventing failed transactions
Current Code
What needs to be done
Implementation
calculate_total_input_fees()