Skip to content

Commit

Permalink
support custom RPC endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Apr 28, 2023
1 parent 02e57a3 commit a293660
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/refresh-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- run: yarn fetch-all-rewarders
env:
NETWORK: mainnet-beta
MAINNET_SOLANA_RPC_ENDPOINT: ${{ secrets.MAINNET_SOLANA_RPC_ENDPOINT }}
- run: yarn fetch-all-rewarders
env:
NETWORK: devnet
Expand Down
7 changes: 4 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export const serialize = (_: unknown, v: unknown) => {
export const makeProvider = (network: Network) => {
return SolanaProvider.init({
connection: new Connection(
network === "mainnet-beta"
? "https://api.mainnet-beta.solana.com"
: "https://api.devnet.solana.com"
process.env.MAINNET_SOLANA_RPC_ENDPOINT ??
(network === "mainnet-beta"
? "https://api.mainnet-beta.solana.com"
: "https://api.devnet.solana.com")
),
wallet: new SignerWallet(Keypair.generate()),
});
Expand Down

0 comments on commit a293660

Please sign in to comment.