[accelerator] rerefactor bitcoin-payment component

This commit is contained in:
Mononaut
2024-06-30 08:39:32 +00:00
parent f114a8ca75
commit 35d0e7fae7
3 changed files with 16 additions and 11 deletions

View File

@@ -77,7 +77,7 @@ export class BitcoinInvoiceComponent implements OnInit, OnChanges, OnDestroy {
if (this.paymentStatusSubscription) {
this.paymentStatusSubscription.unsubscribe();
}
this.paymentStatusSubscription = ((this.invoice && (this.invoice.btcpayInvoiceId || this.invoice.id) === invoiceId) ? of(this.invoice) : this.apiService.retreiveInvoice$(invoiceId)).pipe(
this.paymentStatusSubscription = ((this.invoice && this.invoice.id === invoiceId) ? of(this.invoice) : this.apiService.retreiveInvoice$(invoiceId)).pipe(
tap((invoice: any) => {
this.loadedInvoice = invoice;
if (this.loadedInvoice.btcDue > 0) {