mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
[accelerator] ln qr
This commit is contained in:
parent
1e820a0fc8
commit
3ecc8ae8cf
@ -14,7 +14,7 @@
|
||||
|
||||
<form [formGroup]="paymentForm">
|
||||
|
||||
<div class="form-group">
|
||||
<div *ngIf="availableMethods.length > 1" class="form-group">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<!-- <label *ngIf="invoice.addresses.BTC" class="btn btn-primary" [ngClass]="{'active': paymentForm.get('method')?.value === 'chain'}">
|
||||
<input type="radio" value="chain" formControlName="method"> <fa-icon [icon]="['fas', 'link']" [fixedWidth]="true" title="Onchain"></fa-icon>
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
<div class="qr-wrapper" [class.mt-0]="minimal">
|
||||
<a [href]="bypassSecurityTrustUrl('lightning:' + invoice.addresses.BTC_LightningLike)" target="_blank">
|
||||
<app-qrcode imageUrl="/resources/bitcoin-logo.png" [size]="200" [data]="invoice.addresses.BTC_LightningLike.toUpperCase()"></app-qrcode>
|
||||
<app-qrcode imageUrl="/resources/lightning-logo.png" [size]="200" [data]="invoice.addresses.BTC_LightningLike.toUpperCase()"></app-qrcode>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
@ -87,6 +87,10 @@ export class BitcoinInvoiceComponent implements OnInit, OnDestroy {
|
||||
).subscribe();
|
||||
}
|
||||
|
||||
get availableMethods(): string[] {
|
||||
return Object.keys(this.invoice?.addresses || {}).filter(k => k === 'BTC_LightningLike');
|
||||
}
|
||||
|
||||
bypassSecurityTrustUrl(text: string): SafeUrl {
|
||||
return this.sanitizer.bypassSecurityTrustUrl(text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user