-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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 calculationWhat 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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request