diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index bbd5bfdf..dd173ebd 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -15,6 +15,9 @@ import { SERVER_GQL_PATH } from './constants'; import { Toaster } from 'components/shared/Toast'; import { LogErrorBoundary } from 'utils/log-error'; +// @ts-ignore +console.log(`v-${__VERSION__}`); + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement, ); diff --git a/packages/frontend/src/pages/auth/Login.tsx b/packages/frontend/src/pages/auth/Login.tsx index f0b407b5..e5126ac3 100644 --- a/packages/frontend/src/pages/auth/Login.tsx +++ b/packages/frontend/src/pages/auth/Login.tsx @@ -47,7 +47,9 @@ export const Login = ({ onDone }: Props) => { console.log('Handling google redirect back'); try { await google.handleOAuthRedirectBack(); + // @ts-ignore wallet = await google.getEthersWallet(); + // @ts-ignore const result = await signInWithEthereum(1, 'login', wallet); if (result.error) { setError(result.error); diff --git a/packages/frontend/src/pages/auth/SignUp.tsx b/packages/frontend/src/pages/auth/SignUp.tsx index c8f7fe65..67460d9b 100644 --- a/packages/frontend/src/pages/auth/SignUp.tsx +++ b/packages/frontend/src/pages/auth/SignUp.tsx @@ -39,7 +39,9 @@ export const SignUp = ({ onDone }: Props) => { setProvider('google'); try { await google.handleOAuthRedirectBack(); + // @ts-ignore wallet = await google.getEthersWallet(); + // @ts-ignore const result = await signInWithEthereum(1, 'signup', wallet); if (result.error) { setError({ type: 'provider', message: result.error }); diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index e40bea3b..392274af 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -1,5 +1,7 @@ import { defineConfig, PluginOption } from 'vite'; import react from '@vitejs/plugin-react'; +import { exec } from 'child_process'; +import { promisify } from 'util'; // https://vitejs.dev/config/ export default defineConfig({ @@ -16,5 +18,8 @@ export default defineConfig({ }, define: { 'process.env': {}, + __VERSION__: JSON.stringify( + (await promisify(exec)('git rev-parse --short HEAD')).stdout.trim(), + ), }, });