From 33853a07cbf9eba28dfcbc012ad1544efe5c04d3 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Fri, 24 Feb 2023 09:55:39 +0900 Subject: [PATCH 1/2] Add border input in the qr code component --- frontend/src/app/components/qrcode/qrcode.component.html | 2 +- frontend/src/app/components/qrcode/qrcode.component.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/qrcode/qrcode.component.html b/frontend/src/app/components/qrcode/qrcode.component.html index d7886b907..56f32f42c 100644 --- a/frontend/src/app/components/qrcode/qrcode.component.html +++ b/frontend/src/app/components/qrcode/qrcode.component.html @@ -1,4 +1,4 @@
- +
diff --git a/frontend/src/app/components/qrcode/qrcode.component.ts b/frontend/src/app/components/qrcode/qrcode.component.ts index e8ebac904..dad7522c6 100644 --- a/frontend/src/app/components/qrcode/qrcode.component.ts +++ b/frontend/src/app/components/qrcode/qrcode.component.ts @@ -12,6 +12,7 @@ export class QrcodeComponent implements AfterViewInit { @Input() data: string; @Input() size = 125; @Input() imageUrl: string; + @Input() border = 0; @ViewChild('canvas') canvas: ElementRef; qrcodeObject: any; From 1656e70cc644101fc97bcaffd6a10bfadead775e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Fri, 24 Feb 2023 10:41:17 +0900 Subject: [PATCH 2/2] Fix DB migration 54 breaking liquid --- backend/src/api/database-migration.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index 4dc59a22d..6e4221857 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -86,7 +86,7 @@ class DatabaseMigration { try { await this.$migrateTableSchemaFromVersion(databaseSchemaVersion); if (databaseSchemaVersion === 0) { - logger.notice(`MIGRATIONS: OK. Database schema has been properly initialized to version ${DatabaseMigration.currentVersion} (latest version)`); + logger.notice(`MIGRATIONS: OK. Database schema has been properly initialized to version ${DatabaseMigration.currentVersion} (latest version)`); } else { logger.notice(`MIGRATIONS: OK. Database schema have been migrated from version ${databaseSchemaVersion} to ${DatabaseMigration.currentVersion} (latest version)`); } @@ -300,7 +300,7 @@ class DatabaseMigration { await this.$executeQuery('ALTER TABLE `lightning_stats` ADD med_base_fee_mtokens bigint(20) unsigned NOT NULL DEFAULT "0"'); await this.updateToSchemaVersion(27); } - + if (databaseSchemaVersion < 28 && isBitcoin === true) { if (config.LIGHTNING.ENABLED) { this.uniqueLog(logger.notice, `'lightning_stats' and 'node_stats' tables have been truncated.`); @@ -464,7 +464,7 @@ class DatabaseMigration { await this.$executeQuery('DROP TABLE IF EXISTS `transactions`'); await this.$executeQuery('DROP TABLE IF EXISTS `cpfp_clusters`'); await this.updateToSchemaVersion(52); - } catch(e) { + } catch (e) { logger.warn('' + (e instanceof Error ? e.message : e)); } } @@ -476,9 +476,11 @@ class DatabaseMigration { if (databaseSchemaVersion < 54) { this.uniqueLog(logger.notice, `'prices' table has been truncated`); - this.uniqueLog(logger.notice, `'blocks_prices' table has been truncated`); await this.$executeQuery(`TRUNCATE prices`); - await this.$executeQuery(`TRUNCATE blocks_prices`); + if (isBitcoin === true) { + this.uniqueLog(logger.notice, `'blocks_prices' table has been truncated`); + await this.$executeQuery(`TRUNCATE blocks_prices`); + } await this.updateToSchemaVersion(54); } } @@ -604,7 +606,7 @@ class DatabaseMigration { queries.push(`INSERT INTO state(name, number, string) VALUES ('last_hashrates_indexing', 0, NULL)`); } - if (version < 9 && isBitcoin === true) { + if (version < 9 && isBitcoin === true) { queries.push(`INSERT INTO state(name, number, string) VALUES ('last_weekly_hashrates_indexing', 0, NULL)`); }