Refactor PaymentService methods for clarity and consistency

- Rename methods in PaymentService for improved readability: payInvoiceWithUserWallet to payWithWallet, openExternalLightningWallet to openExternalWallet, and handlePaymentWithFallback to handlePayment.
- Update related composables (useTicketPurchase, useLightningPayment) to reflect method name changes, ensuring consistent usage across the application.
- Modify RelayHub initialization process to set relay URLs before calling initialize, enhancing configuration clarity.
- Remove legacy compatibility flags in RelayHub to streamline the codebase and improve maintainability.
This commit is contained in:
padreug 2025-09-05 15:23:03 +02:00
parent 0bced11623
commit 099c16abc9
5 changed files with 33 additions and 37 deletions

View file

@ -68,7 +68,7 @@ export function useTicketPurchase() {
// Pay with wallet - delegate to PaymentService
async function payWithWallet(paymentRequest: string) {
try {
await paymentService.payInvoiceWithUserWallet(paymentRequest, undefined, {
await paymentService.payWithWallet(paymentRequest, undefined, {
showToast: false // We'll handle success notifications in the ticket purchase flow
})
return true
@ -179,7 +179,7 @@ export function useTicketPurchase() {
// Open Lightning wallet - delegate to PaymentService
function handleOpenLightningWallet() {
if (paymentRequest.value) {
paymentService.openExternalLightningWallet(paymentRequest.value)
paymentService.openExternalWallet(paymentRequest.value)
}
}