Refactor PaymentService and related components for improved state management
- Reset payment state on initialization in PaymentService to prevent stuck states. - Introduce forceResetPaymentState method for debugging purposes. - Update useTicketPurchase and useLightningPayment composables to reflect changes in computed properties for better state handling. - Ensure OrderHistory component resets payment state on mount to enhance user experience.
This commit is contained in:
parent
ef7333e68e
commit
e8b9f04494
4 changed files with 28 additions and 8 deletions
|
|
@ -35,9 +35,9 @@ export function useTicketPurchase() {
|
|||
})
|
||||
|
||||
// Delegate to PaymentService
|
||||
const userWallets = computed(() => paymentService.userWallets)
|
||||
const hasWalletWithBalance = computed(() => paymentService.hasWalletWithBalance)
|
||||
const isPayingWithWallet = computed(() => paymentService.isProcessingPayment)
|
||||
const userWallets = computed(() => paymentService.userWallets) // getter method
|
||||
const hasWalletWithBalance = computed(() => paymentService.hasWalletWithBalance) // getter method
|
||||
const isPayingWithWallet = computed(() => paymentService.isProcessingPayment.value) // computed ref
|
||||
|
||||
// Generate QR code for Lightning payment - delegate to PaymentService
|
||||
async function generateQRCode(bolt11: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue