set error correction level to low for qr codes

This commit is contained in:
Antoni Spaanderman 2022-06-29 17:08:47 +02:00
parent 570d8cfc74
commit f218efbeb2
No known key found for this signature in database
GPG Key ID: AE0B68E552E5DF8C

View File

@ -24,7 +24,7 @@ export class QrcodeComponent implements AfterViewInit {
return; return;
} }
const opts: QRCode.QRCodeRenderersOptions = { const opts: QRCode.QRCodeRenderersOptions = {
errorCorrectionLevel: 'H', errorCorrectionLevel: 'L',
margin: 0, margin: 0,
color: { color: {
dark: '#000', dark: '#000',
@ -38,7 +38,11 @@ export class QrcodeComponent implements AfterViewInit {
} }
const address = this.data; const address = this.data;
if (this.data.indexOf('bc1') === 0 || this.data.indexOf('tb1') === 0) { if (
this.data.indexOf('bc1') === 0 ||
this.data.indexOf('tb1') === 0 ||
this.data.indexOf('bcrt1') === 0
) {
address.toUpperCase(); address.toUpperCase();
} }