diff --git a/migration/1773434400000-AddArkBtcToBaseFees.js b/migration/1773434400000-AddArkBtcToBaseFees.js new file mode 100644 index 0000000000..9ea1109e7e --- /dev/null +++ b/migration/1773434400000-AddArkBtcToBaseFees.js @@ -0,0 +1,21 @@ +module.exports = class AddArkBtcToBaseFees1773434400000 { + name = 'AddArkBtcToBaseFees1773434400000'; + + async up(queryRunner) { + // Add Ark/BTC (asset 426) to all Tier2 base fees that use explicit asset lists + await queryRunner.query(` + UPDATE "dbo"."fee" + SET "assets" = "assets" + ';426' + WHERE "id" IN (4, 5, 6, 10, 11, 12, 16, 17, 18) + AND ';' + "assets" + ';' NOT LIKE '%;426;%' + `); + } + + async down(queryRunner) { + await queryRunner.query(` + UPDATE "dbo"."fee" + SET "assets" = REPLACE("assets", ';426', '') + WHERE "id" IN (4, 5, 6, 10, 11, 12, 16, 17, 18) + `); + } +}; diff --git a/src/subdomains/generic/user/models/auth/auth.service.ts b/src/subdomains/generic/user/models/auth/auth.service.ts index d9fc96467d..9ea6e69cf6 100644 --- a/src/subdomains/generic/user/models/auth/auth.service.ts +++ b/src/subdomains/generic/user/models/auth/auth.service.ts @@ -188,7 +188,7 @@ export class AuthService { type: RecommendationType.INVITATION, method: RecommendationMethod.MAIL, }); - await this.recommendationService.setRecommenderRefCode(recommendation); + if (recommendation) await this.recommendationService.setRecommenderRefCode(recommendation); } await this.checkIpBlacklistFor(user.userData, userIp);