[accelerator] play sound on invoice paid

This commit is contained in:
Mononaut 2024-06-30 10:04:24 +00:00
parent 9140bcb408
commit a80372f335
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 7 additions and 1 deletions

View File

@ -355,7 +355,7 @@
<div class="col-sm text-center d-flex flex-column justify-content-center align-items-center">
@if (invoice) {
<p>Pay <span><small style="font-family: monospace;">{{ cost | number }}</small>&nbsp;<span class="symbol" i18n="shared.sats">sats</span></span></p>
<app-bitcoin-invoice style="width: 100%;" [invoice]="invoice" [invoiceId]="invoice.id" [minimal]="true" (completed)="moveToStep('paid')"></app-bitcoin-invoice>
<app-bitcoin-invoice style="width: 100%;" [invoice]="invoice" [invoiceId]="invoice.id" [minimal]="true" (completed)="bitcoinPaymentCompleted()"></app-bitcoin-invoice>
} @else {
<p>Loading invoice...</p>
<div class="d-flex align-items-center justify-content-center" style="width: 100%; height: 292px;">

View File

@ -460,6 +460,12 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
});
}
bitcoinPaymentCompleted(): void {
this.audioService.playSound('ascend-chime-cartoon');
this.estimateSubscription.unsubscribe();
this.moveToStep('paid')
}
isLoggedIn(): boolean {
const auth = this.storageService.getAuth();
return auth !== null;