Skip to content

Commit

Permalink
chore: Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco committed Oct 15, 2024
1 parent be6b90f commit f2de612
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ const App: React.FC = () => {
}, [isDelegated, connection]);

useEffect(() => {
const initializeEphemeralConnection = async (cluster: string) => {
const initializeEphemeralConnection = async () => {
const cluster = process.env.REACT_APP_MAGICBLOCK_URL || "https://devnet.magicblock.app"
if(ephemeralConnection.current) {
return;
}
Expand All @@ -142,7 +143,7 @@ const App: React.FC = () => {
}
await subscribeToEphemeralCounter();
};
initializeEphemeralConnection(process.env.REACT_APP_MAGICBLOCK_URL || "https://devnet.magicblock.app").catch(console.error);
initializeEphemeralConnection().catch(console.error);
}, [counterPda, subscribeToCounter, subscribeToEphemeralCounter]);

const updateCounter = async (_: number): Promise<void> => {
Expand Down

0 comments on commit f2de612

Please sign in to comment.