lower new user starting balance to M$1000

This commit is contained in:
mantikoros 2021-12-14 11:36:23 -06:00
parent 11cc6ba622
commit b85d9035b0

View File

@ -8,6 +8,8 @@ import {
signInWithPopup, signInWithPopup,
} from 'firebase/auth' } from 'firebase/auth'
export const STARTING_BALANCE = 1000
export type User = { export type User = {
id: string id: string
email: string email: string
@ -50,7 +52,7 @@ export function listenForLogin(onUser: (_user: User | null) => void) {
username: user.displayName?.replace(/\s+/g, '') || 'DefaultUsername', username: user.displayName?.replace(/\s+/g, '') || 'DefaultUsername',
avatarUrl: user.photoURL || '', avatarUrl: user.photoURL || '',
email: user.email || 'default@blah.com', email: user.email || 'default@blah.com',
balance: 10000, balance: STARTING_BALANCE,
// TODO: use Firestore timestamp? // TODO: use Firestore timestamp?
createdTime: Date.now(), createdTime: Date.now(),
lastUpdatedTime: Date.now(), lastUpdatedTime: Date.now(),