load btc invoice details in checkout session and storefront order queries

Ensure bitcoin invoice metadata is available when rendering checkout sessions and customer order pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-06 00:42:02 +02:00
co-authored by Cursor
parent cf92212226
commit 917e86b3de
3 changed files with 13 additions and 3 deletions
@@ -11,9 +11,11 @@ export const createOrderDetailQuery = (orderRepo: Repository<Order>, orderId: st
.leftJoinAndSelect('order.discounts', 'orderDiscount')
.leftJoinAndSelect('order.checkoutInvoice', 'checkoutInvoice')
.leftJoinAndSelect('checkoutInvoice.moneroDetails', 'checkoutMoneroDetails')
.leftJoinAndSelect('checkoutInvoice.btcDetails', 'checkoutBtcDetails')
.leftJoinAndSelect('checkoutInvoice.payments', 'checkoutPayment')
.leftJoinAndSelect('order.shippingInvoice', 'shippingInvoice')
.leftJoinAndSelect('shippingInvoice.moneroDetails', 'shippingMoneroDetails')
.leftJoinAndSelect('shippingInvoice.btcDetails', 'shippingBtcDetails')
.leftJoinAndSelect('shippingInvoice.payments', 'shippingPayment')
.leftJoinAndSelect('order.messages', 'message')
.addSelect('order.accessToken')