Skip to content

Commit

Permalink
fix: Revert "feat: Login with auth server page (#417)" (#418)
Browse files Browse the repository at this point in the history
This reverts commit 675b180.
  • Loading branch information
fzavalia authored Dec 28, 2023
1 parent 675b180 commit 73b787e
Show file tree
Hide file tree
Showing 11 changed files with 5,442 additions and 3,510 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:

- name: build
run: npm run build
env:
CI: false

- name: test
run: npm run test
Expand Down Expand Up @@ -89,7 +87,6 @@ jobs:
- name: build for deployment
run: npm run build:full
env:
CI: false
GEN_STATIC_LOCAL: true

- uses: actions/upload-artifact@v2
Expand Down
9 changes: 3 additions & 6 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ if (process.env.NODE_ENV === 'development') {
babelInclude([
// Src has to be included or else your own app won't be transpiled.
path.resolve(__dirname, 'src'),
// Other dependencies that need to be transpiled.
path.resolve(__dirname, 'node_modules/decentraland-connect/node_modules/ethers'),
path.resolve(__dirname, 'node_modules/@noble'),
path.resolve(__dirname, 'node_modules/@walletconnect'),
path.resolve(__dirname, 'node_modules/unstorage'),
path.resolve(__dirname, 'node_modules/@dcl/single-sign-on-client'),
// WalletConnectV2 modules that need to be transpiled.
path.resolve(__dirname, 'node_modules/decentraland-connect/node_modules/@walletconnect'),
path.resolve(__dirname, 'node_modules/@walletconnect')
])
)
}
Expand Down
8,674 changes: 5,421 additions & 3,253 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@
"@dcl/explorer": "^1.0.131583-20230718133624.commit-7106e1f",
"@dcl/feature-flags": "^1.2.0",
"@dcl/kernel-interface": "^2.0.0-20230512115658.commit-b582e05",
"@dcl/schemas": "^9.10.0",
"@dcl/schemas": "^8.1.0",
"@dcl/urn-resolver": "^1.4.0",
"@sentry/browser": "^7.45.0",
"@sentry/tracing": "^7.45.0",
"decentraland-connect": "^5.3.2",
"decentraland-dapps": "^16.21.4",
"decentraland-ui": "^4.31.0",
"@types/validator": "^13.7.3",
"decentraland-connect": "^4.1.3",
"decentraland-dapps": "^15.5.0",
"decentraland-ui": "^4.1.0",
"detect-browser": "^5.2.0",
"eth-connect": "^6.1.0",
"md5-file": "^5.0.0",
Expand All @@ -56,7 +57,6 @@
"react-scripts": "^4.0.3",
"react-virtualized": "^9.22.5",
"redux": "^4.0.5",
"uuid": "^9.0.1",
"validator": "^13.7.0"
},
"devDependencies": {
Expand All @@ -75,8 +75,6 @@
"@types/react": "^17.0.52",
"@types/react-dom": "^17.0.18",
"@types/react-redux": "^7.1.9",
"@types/uuid": "^9.0.7",
"@types/validator": "^13.11.7",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"babel-loader": "^8.1.0",
"customize-cra": "^1.0.0",
Expand Down
31 changes: 11 additions & 20 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
import React, { useMemo } from 'react'
import { connect } from 'react-redux'
import { useMobileMediaQuery } from 'decentraland-ui/dist/components/Media'
import { isMobile } from '../integration/browser'
import ErrorContainer from './errors/ErrorContainer'
import LoginContainer from './auth/LoginContainer'
import { StoreType } from '../state/redux'
import { isElectron } from '../integration/desktop'
import { SHOW_WALLET_SELECTOR } from '../integration/url'
import { BeginnersGuide } from './auth/BeginnersGuide'
import { BigFooter } from './common/Layout/BigFooter'
import BannerContainer from './banners/BannerContainer'
import { LoadingRender } from './common/Loading/LoadingRender'
import { Navbar } from './common/Layout/Navbar'
import {
FeatureFlags,
isWaitingForRenderer,
isLoginComplete,
ABTestingVariant,
getFeatureVariantName,
getFeatureVariantValue,
isFeatureEnabled
getFeatureVariantValue
} from '../state/selectors'
import { SHOW_WALLET_SELECTOR } from '../integration/url'
import ErrorContainer from './errors/ErrorContainer'
import LoginContainer from './auth/LoginContainer'
import { BeginnersGuide } from './auth/BeginnersGuide'
import { BigFooter } from './common/Layout/BigFooter'
import BannerContainer from './banners/BannerContainer'
import { LoadingRender } from './common/Loading/LoadingRender'
import { Navbar } from './common/Layout/Navbar'
import StreamContainer from './common/StreamContainer'
import { Audio } from './common/Audio'
import { isMobile } from '../integration/browser'
import MobileContainer from './common/MobileContainer'
import CatalystWarningContainer from './warning/CatalystWarningContainer'
import { LoginWithAuthServerPage } from './auth/LoginWithAuthServerPage'
import './App.css'

function mapStateToProps(state: StoreType): AppProps {
Expand All @@ -43,7 +41,6 @@ function mapStateToProps(state: StoreType): AppProps {
const trustedCatalyst = !!state.catalyst?.trusted
const error = !!state.error.error
const sound = true // TODO: sound must be true after the first click
const isDesktopClientSignInWithAuthDappEnabled = isFeatureEnabled(state, FeatureFlags.DesktopClientSignInWithAuthDapp)

return {
seamlessLogin,
Expand All @@ -55,8 +52,7 @@ function mapStateToProps(state: StoreType): AppProps {
rendererReady,
trustedCatalyst,
error,
sound,
isDesktopClientSignInWithAuthDappEnabled
sound
}
}

Expand All @@ -71,7 +67,6 @@ export interface AppProps {
trustedCatalyst: boolean
error: boolean
sound: boolean
isDesktopClientSignInWithAuthDappEnabled: boolean
}

const App: React.FC<AppProps> = (props) => {
Expand Down Expand Up @@ -102,10 +97,6 @@ const App: React.FC<AppProps> = (props) => {
return <LoadingRender />
}

if (isElectron() && props.isDesktopClientSignInWithAuthDappEnabled) {
return <LoginWithAuthServerPage />
}

return (
<div className={`WebsiteApp ${props.hasBanner ? 'withBanner' : ''}`}>
<BannerContainer />
Expand Down
78 changes: 0 additions & 78 deletions src/components/auth/LoginWithAuthServerPage.css

This file was deleted.

137 changes: 0 additions & 137 deletions src/components/auth/LoginWithAuthServerPage.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/images/back.svg

This file was deleted.

Binary file removed src/images/party.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/integration/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const initializeFeatureFlags = callOnce(async () => {
let ff = defaultFeatureFlagsState as FeatureFlagsResult

try {
ff = await fetchFlags({ applicationName: ['explorer', 'dapps'] })
ff = await fetchFlags({ applicationName: ['explorer'] })
} catch (err) {
console.error('Error fetching feature flags', err)
}
Expand Down
3 changes: 1 addition & 2 deletions src/state/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export function getRequiredAnalyticsContext(state: StoreType): SessionTraits {

export enum FeatureFlags {
Stream = 'explorer-stream',
SeamlessLogin = 'explorer-seamless_login_variant',
DesktopClientSignInWithAuthDapp = 'dapps-desktop-client-with-auth-dapp'
SeamlessLogin = 'explorer-seamless_login_variant'
}

export enum VariantNames {
Expand Down

0 comments on commit 73b787e

Please sign in to comment.