Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Oct 21, 2024
1 parent 32f5711 commit daaf074
Show file tree
Hide file tree
Showing 3 changed files with 1,324 additions and 1,210 deletions.
10 changes: 7 additions & 3 deletions packages/keychain/src/components/Funding/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function formatTokenBalance(balance: bigint): string {
}

function formatUsdBalance(balance: bigint, price: number) {
return parseFloat(formatEther(balance)) * price
return parseFloat(formatEther(balance)) * price;
}

export function Balance({ showBalances }: BalanceProps) {
Expand Down Expand Up @@ -58,7 +58,9 @@ export function Balance({ showBalances }: BalanceProps) {
<HStack>
<CreditsIcon fontSize={20} />
<Text>{formatTokenBalance(creditsBalance)}</Text>
<Text color="text.secondary">${formatUsdBalance(creditsBalance, 1).toFixed(2)}</Text>
<Text color="text.secondary">
${formatUsdBalance(creditsBalance, 1).toFixed(2)}
</Text>
</HStack>
<Spacer />
<HStack color="text.secondary">
Expand All @@ -80,7 +82,9 @@ export function Balance({ showBalances }: BalanceProps) {
<HStack>
<EthereumIcon fontSize={20} />
<Text>{formatTokenBalance(ethBalance)}</Text>
<Text color="text.secondary">${formatUsdBalance(ethBalance, price).toFixed(2)}</Text>
<Text color="text.secondary">
${formatUsdBalance(ethBalance, price).toFixed(2)}
</Text>
</HStack>
<Spacer />
<HStack color="text.secondary">
Expand Down
Loading

0 comments on commit daaf074

Please sign in to comment.