diff --git a/src/app/invoice/invoice.component.ts b/src/app/invoice/invoice.component.ts index a702b43..4149eb0 100644 --- a/src/app/invoice/invoice.component.ts +++ b/src/app/invoice/invoice.component.ts @@ -55,9 +55,9 @@ export class InvoiceComponent implements OnInit { constructor( private _ActiveRoute:ActivatedRoute, private router: Router, - private sanitizer: DomSanitizer, + private sanitizer: DomSanitizer, public receiptService: ReceiptService, - private notifierService : NotifierService + private notifierService : NotifierService ) { this.orderId = this._ActiveRoute.snapshot.paramMap.get("orderId"); this.orderUpdate = receiptService.orderUpdate; @@ -83,9 +83,8 @@ export class InvoiceComponent implements OnInit { }); this.orderUpdate.subscribe(order => { this.order = order; - this.codeString = `zcash:${this.order.address}?amount=${this.order.totalZec.toFixed(8)}&memo=${URLSafeBase64.encode(Buffer.from('ZGo Order::'.concat(this.orderId!)))}`; - this.zcashUrl = this.sanitizer.bypassSecurityTrustUrl(this.codeString); - + this.codeString = `zcash:${this.order.address}?amount=${this.order.totalZec.toFixed(8)}&memo=${URLSafeBase64.encode(Buffer.from('ZGo Order::'.concat(this.orderId!)))}`; + this.zcashUrl = this.sanitizer.bypassSecurityTrustUrl(this.codeString); }); this.nameUpdate.subscribe(name => { this.name = name; @@ -95,6 +94,10 @@ export class InvoiceComponent implements OnInit { ngOnInit(): void { } + ngAfterViewInit(): void { + console.log('Order.externalInvoice -> ' + this.order.externalInvoice); + } + getIconStyle(order : Order) { if( order.paid ) return "font-size: 14px; color: #72cc50; margin-bottom: -2px;";