Skip to content

Commit cfd93ea

Browse files
committed
Add chainId parameter to fetchSolanaBalance
The fetchSolanaBalance function now accepts an optional chainId parameter, defaulting to 'solana:mainnet'. This allows callers to specify the Solana network (mainnet or devnet) when fetching balances.
1 parent 5e4db2f commit cfd93ea

File tree

1 file changed

+3
-1
lines changed
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib

1 file changed

+3
-1
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/lib/getSolanaBalance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ export async function fetchSolanaBalance({
1212
publicKey,
1313
authToken,
1414
clientId,
15+
chainId = "solana:mainnet",
1516
}: {
1617
publicKey: string;
1718
authToken: string;
1819
clientId: string;
20+
chainId?: "solana:mainnet" | "solana:devnet";
1921
}): Promise<{
2022
displayValue: string;
2123
symbol: string;
@@ -28,7 +30,7 @@ export async function fetchSolanaBalance({
2830
address: publicKey,
2931
},
3032
query: {
31-
chainId: "solana:mainnet",
33+
chainId,
3234
},
3335
headers: {
3436
Authorization: `Bearer ${authToken}`,

0 commit comments

Comments
 (0)