chore: added a comment explaining why key is needed

This commit is contained in:
Artur Siaznik
2023-04-20 14:32:50 +02:00
committed by asiaznik
parent 9a9128233f
commit 6f5a2d084a
+4
View File
@@ -9,6 +9,10 @@ interface Web3ProviderProps {
}
export const Web3Provider = ({ children, connectors }: Web3ProviderProps) => {
/**
* The connectors prop passed to Web3ReactProvider must be referentially static.
* https://github.com/Uniswap/web3-react/blob/31742897f9fddb38e00e36c2516029d3df9a9c54/packages/core/src/provider.tsx#L66
*/
const key = useMemo(
() => `WEB3_PROVIDER_${Date.now().toString()}`,
// eslint-disable-next-line react-hooks/exhaustive-deps