Show the floor of your balance

This commit is contained in:
jahooma 2022-01-08 12:14:20 -06:00
parent abb5d53431
commit 1013192281
3 changed files with 9 additions and 3 deletions

View File

@ -7,7 +7,8 @@ type DocRef = admin.firestore.DocumentReference
// Generate your own private key, and set the path below:
// https://console.firebase.google.com/u/0/project/mantic-markets/settings/serviceaccounts/adminsdk
const serviceAccount = require('../../../../Downloads/dev-mantic-markets-firebase-adminsdk-sir5m-b2d27f8970.json')
// const serviceAccount = require('../../../../Downloads/dev-mantic-markets-firebase-adminsdk-sir5m-b2d27f8970.json')
const serviceAccount = require('../../../../Downloads/mantic-markets-firebase-adminsdk-1ep46-820891bb87.json')
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),

View File

@ -126,7 +126,10 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
Amount{' '}
{user && (
<span className="float-right">
{formatMoney(remainingBalance > 0 ? remainingBalance : 0)} left
{formatMoney(
remainingBalance > 0 ? Math.floor(remainingBalance) : 0
)}{' '}
left
</span>
)}
</div>

View File

@ -73,7 +73,9 @@ function ProfileSummary(props: { user: User }) {
</div>
<div className="truncate text-left" style={{ maxWidth: 170 }}>
{user.name}
<div className="text-gray-700 text-sm">{formatMoney(user.balance)}</div>
<div className="text-gray-700 text-sm">
{formatMoney(Math.floor(user.balance))}
</div>
</div>
</Row>
)