From 36c1ebf27d988c0743415d50bced06ac1fac9c52 Mon Sep 17 00:00:00 2001 From: Evan Kaloudis Date: Fri, 21 Jun 2024 14:14:56 -0400 Subject: [PATCH 1/2] LSP-101: LSPS1: Explicitly support LSPS1 payment options --- components/LSPS1OrderResponse.tsx | 401 +++++++++++++++++++++++------- locales/en.json | 3 + views/Settings/LSPS1/index.tsx | 104 ++++---- 3 files changed, 362 insertions(+), 146 deletions(-) diff --git a/components/LSPS1OrderResponse.tsx b/components/LSPS1OrderResponse.tsx index 96f92fa1e..b498971eb 100644 --- a/components/LSPS1OrderResponse.tsx +++ b/components/LSPS1OrderResponse.tsx @@ -173,88 +173,247 @@ export default class LSPS1OrderResponse extends React.Component< } /> )} - - {payment?.fee_total_sat && ( - + + {payment?.state && ( + )} - value={ - + } /> - } - /> - )} - {(payment?.lightning_invoice || - payment?.bolt11_invoice) && ( - - )} - {payment?.state && ( - - )} - {payment?.min_fee_for_0conf && ( - + } + /> )} - value={payment?.min_fee_for_0conf} - /> - )} - {payment?.min_onchain_payment_confirmations && ( - )} - value={ - payment?.min_onchain_payment_confirmations - } - /> - )} - {payment?.onchain_address && ( - )} - value={payment?.onchain_address} - /> + {payment?.min_onchain_payment_confirmations && ( + + )} + {payment?.onchain_address && ( + + )} + {payment?.onchain_payment && ( + + )} + )} - {payment?.onchain_payment && ( - + + {payment?.bolt11.state && ( + )} - value={payment?.onchain_payment} - /> + {payment?.bolt11.fee_total_sat && ( + + } + /> + )} + {payment?.bolt11.order_total_sat && ( + + } + /> + )} + {payment?.bolt11.expires_at && ( + + )} + {payment?.bolt11.invoice && ( + + )} + )} - {payment?.order_total_sat && ( - + + {payment?.onchain.fee_total_sat && ( + + } + /> )} - value={ - + } /> - } - /> + )} + {payment?.onchain.expires_at && ( + + )} + {payment?.onchain.address && ( + + )} + {payment?.onchain.min_fee_for_0conf && ( + + )} + {payment?.onchain + .min_onchain_payment_confirmations && ( + + )} + )} {channel && ( <> @@ -294,30 +453,82 @@ export default class LSPS1OrderResponse extends React.Component< )} {orderResponse?.order_state === 'CREATED' && orderView && ( -