Skip to content

Commit

Permalink
Simplify getCachedProviderForNetwork
Browse files Browse the repository at this point in the history
Co-authored-by: gregs <[email protected]>
  • Loading branch information
christianbaroni and greg-schrammel authored Jun 9, 2024
1 parent b7e1184 commit 03576b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/handlers/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,7 @@ export const getFlashbotsProvider = async () => {
};

export const getCachedProviderForNetwork = (network: Network = Network.mainnet): StaticJsonRpcProvider | undefined => {
const cachedProvider = networkProviders.get(network);
if (cachedProvider) {
return cachedProvider;
}
return undefined;
return networkProviders.get(network);
};

/**
Expand Down

0 comments on commit 03576b9

Please sign in to comment.