Skip to content

Commit

Permalink
fix: proxy (#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino authored Apr 5, 2024
1 parent 5cd9e12 commit eadf62c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
16 changes: 0 additions & 16 deletions src/core/firebase/useRemoteConfig.ts

This file was deleted.

10 changes: 4 additions & 6 deletions src/entries/popup/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { flushQueuedEvents } from '~/analytics/flushQueuedEvents';
// !!!! DO NOT REMOVE THE NEXT 2 LINES BELOW !!!!
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import config from '~/core/firebase/remoteConfig';
import { useRemoteConfig } from '~/core/firebase/useRemoteConfig';
import { initializeMessenger } from '~/core/messengers';
import { persistOptions, queryClient } from '~/core/react-query';
import { initializeSentry, setSentryUser } from '~/core/sentry';
Expand Down Expand Up @@ -39,17 +38,16 @@ export function App() {
const { deviceId } = useDeviceIdStore();
const { rainbowChains } = useRainbowChains();
const prevChains = usePrevious(rainbowChains);
const { remoteConfig } = useRemoteConfig();

useExpiryListener();

React.useEffect(() => {
if (!isEqual(prevChains, rainbowChains)) {
backgroundMessenger.send('rainbow_updateWagmiClient', {
rpcProxyEnabled: remoteConfig.rpc_proxy_enabled,
rpcProxyEnabled: config.rpc_proxy_enabled,
});
}
}, [prevChains, rainbowChains, remoteConfig.rpc_proxy_enabled]);
}, [prevChains, rainbowChains]);

const wagmiClient = React.useMemo(
() =>
Expand All @@ -66,10 +64,10 @@ export function App() {
React.useEffect(() => {
if (!isEqual(prevChains, rainbowChains)) {
backgroundMessenger.send('rainbow_updateWagmiClient', {
rpcProxyEnabled: remoteConfig.rpc_proxy_enabled,
rpcProxyEnabled: config.rpc_proxy_enabled,
});
}
}, [prevChains, rainbowChains, remoteConfig.rpc_proxy_enabled]);
}, [prevChains, rainbowChains]);

React.useEffect(() => {
// Disable analytics & sentry for e2e and dev mode
Expand Down

0 comments on commit eadf62c

Please sign in to comment.