diff --git a/src/app/scan/scan.component.html b/src/app/scan/scan.component.html index 864d305..38bf125 100644 --- a/src/app/scan/scan.component.html +++ b/src/app/scan/scan.component.html @@ -23,5 +23,10 @@ -

Can't scan? Use this wallet link. +

+

Can't scan? Use this wallet link, or

+ + + +
diff --git a/src/app/scan/scan.component.ts b/src/app/scan/scan.component.ts index c4742a9..5d241e0 100644 --- a/src/app/scan/scan.component.ts +++ b/src/app/scan/scan.component.ts @@ -53,4 +53,41 @@ export class ScanComponent implements OnInit{ close() { this.dialogRef.close(false); } + + copyAddress() { + if (!navigator.clipboard) { + alert("Copy functionality not supported"); + } + try { + navigator.clipboard.writeText(this.address); + } catch (err) { + console.error("Error", err); + } + } + + copyAmount() { + if (!navigator.clipboard) { + alert("Copy functionality not supported"); + } + try { + navigator.clipboard.writeText(this.total.toString()); + } catch (err) { + console.error("Error", err); + } + } + + copyMemo() { + if (!navigator.clipboard) { + alert("Copy functionality not supported"); + } + try { + if (this.pay) { + navigator.clipboard.writeText("ZGOp::" + this.session); + } else { + navigator.clipboard.writeText("ZGO::" + this.session + " Reply-To:"); + } + } catch (err) { + console.error("Error", err); + } + } }