Merge pull request #1952 from antonilol/qrcodes

set error correction level to low for qr codes
This commit is contained in:
wiz 2022-07-06 23:45:02 +02:00 committed by GitHub
commit 3424bb9d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ export class QrcodeComponent implements AfterViewInit {
return;
}
const opts: QRCode.QRCodeRenderersOptions = {
errorCorrectionLevel: 'H',
errorCorrectionLevel: 'L',
margin: 0,
color: {
dark: '#000',
@ -38,7 +38,11 @@ export class QrcodeComponent implements AfterViewInit {
}
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();
}