Skip to content

Commit

Permalink
fix balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaque committed Sep 11, 2024
1 parent 02e49ae commit 14d979b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export type BalanceUsdCenticents = {
available: { centicents: Centicents; whole: number };
reserved: { centicents: Centicents; whole: number };
};
async function getBalance(): Promise<BalanceUsdCenticents> {
export async function getBalance(): Promise<BalanceUsdCenticents> {
const loggedIn = await isLoggedIn();
if (!loggedIn) {
logLoginMessageAndQuit();
Expand Down Expand Up @@ -109,7 +109,7 @@ async function getBalance(): Promise<BalanceUsdCenticents> {
let available: number;
switch (data.available.currency) {
case "usd":
available = data.available.amount / 10_000;
available = data.available.amount;
break;
default:
logAndQuit(`Unsupported currency: ${data.available.currency}`);
Expand All @@ -118,7 +118,7 @@ async function getBalance(): Promise<BalanceUsdCenticents> {
let reserved: number;
switch (data.reserved.currency) {
case "usd":
reserved = data.reserved.amount / 10_000;
reserved = data.reserved.amount;
break;
default:
logAndQuit(`Unsupported currency: ${data.reserved.currency}`);
Expand Down

0 comments on commit 14d979b

Please sign in to comment.