[btcpay] fix displayed amount

This commit is contained in:
nymkappa
2024-06-29 16:47:38 +09:00
parent c249da7901
commit 1067131120
2 changed files with 8 additions and 10 deletions

View File

@@ -65,9 +65,7 @@ export class BitcoinInvoiceComponent implements OnInit, OnDestroy {
this.paymentStatusSubscription = this.apiService.retreiveInvoice$(invoiceId).pipe(
tap((invoice: any) => {
this.invoice = invoice;
this.invoice.amount = invoice.btcDue ?? (invoice.cryptoInfo.length ? parseFloat(invoice.cryptoInfo[0].totalDue) : 0) ?? 0;
if (this.invoice.amount > 0) {
if (this.invoice.btcDue > 0) {
this.paymentStatus = 2;
} else {
this.paymentStatus = 4;