Skip to content

Commit

Permalink
Fixed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisassad committed Nov 18, 2024
1 parent 400ab68 commit afe7e98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 0 additions & 9 deletions packages/commonwealth/client/scripts/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { FarcasterExtension } from '@magic-ext/farcaster';
import { OAuthExtension } from '@magic-ext/oauth2';
import { OpenFeatureProvider } from '@openfeature/react-sdk';
import { OpenFeature } from '@openfeature/web-sdk';
import { QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import useInitApp from 'hooks/useInitApp';
import { Magic } from 'magic-sdk';
import router from 'navigation/Router';
import React, { StrictMode } from 'react';
import { HelmetProvider } from 'react-helmet-async';
Expand All @@ -21,12 +18,6 @@ import { Mava } from './views/components/Mava';

OpenFeature.setProvider(openFeatureProvider);

// need to instantiate it early because the farcaster sdk has an async constructor which will cause a race condition
// if instantiated right before the login is called;
export const defaultMagic = new Magic(process.env.MAGIC_PUBLISHABLE_KEY!, {
extensions: [new FarcasterExtension(), new OAuthExtension()],
});

const App = () => {
const { isLoading } = useInitApp();
const { isAddedToHomeScreen, isMarketingPage, isIOS, isAndroid } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
WalletSsoSource,
} from '@hicommonwealth/shared';
import { CosmosExtension } from '@magic-ext/cosmos';
import { FarcasterExtension } from '@magic-ext/farcaster';
import { OAuthExtension } from '@magic-ext/oauth2';
import axios from 'axios';
import { notifyError } from 'controllers/app/notifications';
Expand All @@ -32,11 +33,16 @@ import {
import { welcomeOnboardModal } from 'state/ui/modals/welcomeOnboardModal';
import { userStore } from 'state/ui/user';
import { z } from 'zod';
import { defaultMagic } from '../../App';
import Account from '../../models/Account';
import AddressInfo from '../../models/AddressInfo';
import type BlockInfo from '../../models/BlockInfo';

// need to instantiate it early because the farcaster sdk has an async constructor which will cause a race condition
// if instantiated right before the login is called;
export const defaultMagic = new Magic(process.env.MAGIC_PUBLISHABLE_KEY!, {
extensions: [new FarcasterExtension(), new OAuthExtension()],
});

function storeActiveAccount(account: Account) {
const user = userStore.getState();
user.setData({ activeAccount: account });
Expand Down

0 comments on commit afe7e98

Please sign in to comment.