fix(core): read the routing fee from fee, not the absent fee_msat #171

Merged
padreug merged 2 commits from fix/fee-field-name into dev 2026-09-26 12:37:30 +00:00
Showing only changes of commit 21d4e0e4df - Show all commits

fix(market): declare feeMsat on Order so the persisted fee is typed

`useLightningPayment` writes feeMsat onto the paid order, but `Order`
never declared it. `updateOrder` takes `Partial<Order>`, and the write
goes through an inferred variable, so the excess-property check never
fired — the value landed in the store invisible to the type system and
unreadable by any consumer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Padreug 2026-09-26 14:26:29 +02:00

View file

@ -129,6 +129,7 @@ export interface Order {
originalOrderId?: string originalOrderId?: string
lightningInvoice?: any lightningInvoice?: any
paymentHash?: string paymentHash?: string
feeMsat?: number // Routing fee paid on the Lightning payment, in millisats
paidAt?: number paidAt?: number
paymentStatus?: 'pending' | 'paid' | 'expired' paymentStatus?: 'pending' | 'paid' | 'expired'
paid?: boolean // Direct boolean field matching nostrmarket reference paid?: boolean // Direct boolean field matching nostrmarket reference