fix payment UI

This commit is contained in:
jwinterm
2025-12-24 17:24:04 -05:00
parent 3589406bac
commit e218fbf67b
4 changed files with 268 additions and 75 deletions
+9
View File
@@ -92,6 +92,7 @@ const SocketHandlers = {
socket.on('payment_created', this.onPaymentCreated);
socket.on('payment_confirmed', this.onPaymentConfirmed);
socket.on('payment_detected', this.onPaymentDetected);
socket.on('show_payment_options', this.onShowPaymentOptions);
socket.on('credits_update', this.onCreditsUpdate);
// Block height handler
@@ -603,6 +604,14 @@ const SocketHandlers = {
}
},
onShowPaymentOptions: function(data) {
console.log('Show payment options:', data);
// Show the payment options modal so user can choose how to play
if (typeof PaymentUI !== 'undefined') {
PaymentUI.show();
}
},
_lastDisplayedConfirmation: null,
_confirmationTimestamps: {}, // paymentId -> ts
onPaymentConfirmed: function(data) {