use checkout payment method for shipping invoices

Load btc details on admin order queries and issue shipping invoices in the same crypto the customer used at checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-06 00:42:05 +02:00
co-authored by Cursor
parent 917e86b3de
commit 500fe6cf94
2 changed files with 24 additions and 3 deletions
@@ -15,7 +15,6 @@ import type { InvoiceExtended } from '../../payment/types/InvoiceExtended';
import type { InvoicePaymentExtended } from '../../payment/types/InvoicePaymentExtended';
import { InvoiceReason } from '../../payment/types/InvoiceReason';
import { InvoiceService } from '../../payment/services/InvoiceService';
import { PaymentMethod } from '../../payment/types/PaymentMethod';
import { DeliveryMode } from '../../product/types/DeliveryMode';
import { SetDeliveryCostDto } from '../dto/SetDeliveryCostDto';
import type { ListOrdersQueryDto } from '../dto/ListOrdersQueryDto';
@@ -99,9 +98,11 @@ export class OrderService {
'checkoutInvoice',
'checkoutInvoice.payments',
'checkoutInvoice.moneroDetails',
'checkoutInvoice.btcDetails',
'shippingInvoice',
'shippingInvoice.payments',
'shippingInvoice.moneroDetails',
'shippingInvoice.btcDetails',
'lines',
'lines.manualFulfillment',
'discounts',
@@ -244,7 +245,7 @@ export class OrderService {
}
const shippingInvoice = await this.invoiceService.issueInvoice({
paymentMethod: PaymentMethod.Xmr,
paymentMethod: order.checkoutInvoice.paymentMethod,
reason: InvoiceReason.Shipping,
contextId: orderId,
amountFiat: deliveryCost