We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1a5d54 commit ee90744Copy full SHA for ee90744
src/helpers/solana.ts
@@ -1,7 +1,7 @@
1
import { Connection } from "@solana/web3.js";
2
3
export const getConnection = (): Connection => {
4
- const rpc = process.env.SOLANA_RPC as string;
+ const rpc = process.env.SOLANA_RPC || "https://api.mainnet-beta.solana.com";
5
const connection = new Connection(rpc);
6
const getBlock = async (block: number) => {
7
return new Connection(rpc).getBlock(block, {
0 commit comments