Skip to content

Commit

Permalink
misc: prettier run
Browse files Browse the repository at this point in the history
  • Loading branch information
scnale committed Dec 7, 2023
1 parent b3e93cf commit 975361b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/wallets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export type Balance = {
};

export type TokenBalance = Balance & {
tokenAddress?: string; // Why can solana tokens not have a token address?
// TODO: put Solana mint address here and make this not optional
// Otherwise handle this as a tagged union if there are other types of tokens there.
tokenAddress?: string;
};

export type WalletBalance = Balance & {
Expand Down
4 changes: 2 additions & 2 deletions src/wallets/solana/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ export class SolanaWalletToolbox extends WalletToolbox {
address,
formattedBalance: formattedBalance.toString(),
symbol: tokenKnownSymbol ?? "unknown",
...(tokenUsdPrice && {
balanceUsd: Number(formattedBalance) * tokenUsdPrice,
...(tokenUsdPrice !== undefined && {
balanceUsd: formattedBalance * tokenUsdPrice,
tokenUsdPrice
})
};
Expand Down

0 comments on commit 975361b

Please sign in to comment.