From f218efbeb27bbfb3aae318000156a16036126ba6 Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <56turtle56@gmail.com> Date: Wed, 29 Jun 2022 17:08:47 +0200 Subject: [PATCH 1/5] set error correction level to low for qr codes --- frontend/src/app/components/qrcode/qrcode.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/qrcode/qrcode.component.ts b/frontend/src/app/components/qrcode/qrcode.component.ts index 1a0c7604d..30c8a8362 100644 --- a/frontend/src/app/components/qrcode/qrcode.component.ts +++ b/frontend/src/app/components/qrcode/qrcode.component.ts @@ -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(); } From 386a2de1173615d8c7d9048c6baec231ac9ccd62 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 6 Jul 2022 23:38:04 +0200 Subject: [PATCH 2/5] contributors: Add `erikarvstedt` --- contributors/erikarvstedt.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 contributors/erikarvstedt.txt diff --git a/contributors/erikarvstedt.txt b/contributors/erikarvstedt.txt new file mode 100644 index 000000000..0f84df7c2 --- /dev/null +++ b/contributors/erikarvstedt.txt @@ -0,0 +1,3 @@ +I hereby accept the terms of the Contributor License Agreement in the CONTRIBUTING.md file of the mempool/mempool git repository as of July 6, 2022. + +Signed: erikarvstedt From 78ee671051a3dc2704f68a77997e331cd4f0ebbc Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 6 Jul 2022 23:38:05 +0200 Subject: [PATCH 3/5] CI/frontend: Add missing install flag for `prod` flavor Also restrict linting, which requires dev packages, to the `dev` flavor. This makes the frontend build setup indentical to the backend. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a3b69571..3a2901aec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Install (Prod dependencies only) - run: npm install + run: npm install --prod if: ${{ matrix.flavor == 'prod'}} working-directory: ${{ matrix.flavor }}/frontend @@ -76,7 +76,8 @@ jobs: run: npm install working-directory: ${{ matrix.flavor }}/frontend - - name: Lint + - name: Lint + if: ${{ matrix.flavor == 'dev'}} run: npm run lint working-directory: ${{ matrix.flavor }}/frontend From 80476a2b61e74ffbd99439c1a606d941c54f6fbd Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 6 Jul 2022 23:38:06 +0200 Subject: [PATCH 4/5] CI: Use `npm ci` instead of `npm install` `npm ci` is recommended instead of `npm install` for automated builds. Its main advantage is the `package-lock.json` consistency check: The command fails if the lock file doesn't match `package.json`. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a2901aec..a8c609130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,12 @@ jobs: - name: Install if: ${{ matrix.flavor == 'dev'}} - run: npm install + run: npm ci working-directory: ${{ matrix.flavor }}/backend - name: Install (Prod dependencies only) if: ${{ matrix.flavor == 'prod'}} - run: npm install --prod + run: npm ci --prod working-directory: ${{ matrix.flavor }}/backend - name: Lint @@ -67,13 +67,13 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Install (Prod dependencies only) - run: npm install --prod + run: npm ci --prod if: ${{ matrix.flavor == 'prod'}} working-directory: ${{ matrix.flavor }}/frontend - name: Install if: ${{ matrix.flavor == 'dev'}} - run: npm install + run: npm ci working-directory: ${{ matrix.flavor }}/frontend - name: Lint From 6288bcde51c24871aaf273487bb8569e5a1d0cd0 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 6 Jul 2022 23:38:07 +0200 Subject: [PATCH 5/5] CI: Add `--no-optional` flag to prod flavor This ensures that the packages build successfully even when optional deps are unavailable. `--no-optional` currently has no effect on the backend, because it has no optional packages. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8c609130..3c65b3821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Install (Prod dependencies only) if: ${{ matrix.flavor == 'prod'}} - run: npm ci --prod + run: npm ci --prod --no-optional working-directory: ${{ matrix.flavor }}/backend - name: Lint @@ -67,7 +67,7 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Install (Prod dependencies only) - run: npm ci --prod + run: npm ci --prod --no-optional if: ${{ matrix.flavor == 'prod'}} working-directory: ${{ matrix.flavor }}/frontend