feat: linting + prettier

This commit is contained in:
aryan
2024-12-25 17:08:17 +05:30
parent 2753794342
commit c81aa7f892
25 changed files with 1202 additions and 103 deletions

View File

@@ -11,11 +11,12 @@ export async function get_balance(
agent: SolanaAgentKit,
token_address?: PublicKey,
): Promise<number> {
if (!token_address)
if (!token_address) {
return (
(await agent.connection.getBalance(agent.wallet_address)) /
LAMPORTS_PER_SOL
);
}
const token_account =
await agent.connection.getTokenAccountBalance(token_address);