From 7d7ef11d3d7e3ed17bfd36faf9fa16b3ac28de1f Mon Sep 17 00:00:00 2001 From: blend <151626101+blendtwenty@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:40:56 +1100 Subject: [PATCH] Add tests; correct doge URI protocol; add data-attributes; --- src/components/doge-qr/demo/index.html | 28 ++++++++++++++++---------- src/components/doge-qr/doge-qr.js | 8 ++++---- src/components/doge-qr/test.html | 18 +++++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/src/components/doge-qr/demo/index.html b/src/components/doge-qr/demo/index.html index c71793e..f24cbc4 100644 --- a/src/components/doge-qr/demo/index.html +++ b/src/components/doge-qr/demo/index.html @@ -56,8 +56,10 @@
- 3. Test your QR code is working before sharing it with others. It should lead you to a URL formatted like so: dogecoin://D89DhnsgKncmN12RejxudfU8AwXp3946q1?amount=100 + 3. Test your QR code is working before sharing it with others. It should lead you to a URL formatted like so: dogecoin:D89DhnsgKncmN12RejxudfU8AwXp3946q1?amount=100
diff --git a/src/components/doge-qr/doge-qr.js b/src/components/doge-qr/doge-qr.js index 5900dc8..8f21339 100644 --- a/src/components/doge-qr/doge-qr.js +++ b/src/components/doge-qr/doge-qr.js @@ -107,7 +107,7 @@ export class DogeQR extends LitElement { if (!this.address) { return "Address not provided." } - return `dogecoin://${this.address}${this.appendAmount()}` + return `dogecoin:${this.address}${this.appendAmount()}` } appendAmount() { @@ -125,8 +125,8 @@ export class DogeQR extends LitElement { data: this.generateQrValue(), imageOptions: { crossOrigin: "anonymous", - hideBackgroundDots: false, - imageSize: 0.5, + hideBackgroundDots: true, + imageSize: 0.4, margin: 0 }, ...this.applyTheme(), @@ -146,7 +146,7 @@ export class DogeQR extends LitElement { render() { return html` -