From dcd2ccae1bdc9eff61c712f2a9c5999f47b6870b Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 18 Jul 2022 23:29:32 -0700 Subject: [PATCH] Allow environments to override the referral bonus --- common/envs/prod.ts | 1 + common/user.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/envs/prod.ts b/common/envs/prod.ts index f8aaf4cc..5bd12095 100644 --- a/common/envs/prod.ts +++ b/common/envs/prod.ts @@ -22,6 +22,7 @@ export type EnvConfig = { // Currency controls fixedAnte?: number startingBalance?: number + referralBonus?: number } type FirebaseConfig = { diff --git a/common/user.ts b/common/user.ts index 1995ce34..0dac5a19 100644 --- a/common/user.ts +++ b/common/user.ts @@ -45,7 +45,7 @@ export type User = { export const STARTING_BALANCE = ENV_CONFIG.startingBalance ?? 1000 // for sus users, i.e. multiple sign ups for same person export const SUS_STARTING_BALANCE = ENV_CONFIG.startingBalance ?? 10 -export const REFERRAL_AMOUNT = 500 +export const REFERRAL_AMOUNT = ENV_CONFIG.referralBonus ?? 500 export type PrivateUser = { id: string // same as User.id username: string // denormalized from User