Skip to content

Commit

Permalink
Revert "Merge pull request #160 from dappforce/deploy/active-staking"
Browse files Browse the repository at this point in the history
This reverts commit 2654ff6, reversing
changes made to 103e7fd.
  • Loading branch information
teodorus-nathaniel committed Jan 10, 2024
1 parent 2654ff6 commit 979e99d
Show file tree
Hide file tree
Showing 96 changed files with 1,002 additions and 3,450 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,11 @@ jobs:
GH_GA_ID=G-TP1XEFNHQD
GH_APP_KIND=polkaverse
GH_HCAPTCHA_SITE_KEY=${{ secrets.PROD_HCAPTCHA_SITE_KEY }}
GH_AMP_ID=2eeca0e8a0163c89e3f023c971e426a6
GH_AMP_ID=71bf5a46800fedba5e9a01243b988164
GH_OFFCHAIN_SIGNER_URL=https://signer.subsocial.network
GH_CONNECTION_KIND=main
GH_SELLER_CLIENT_ID=${{ secrets.SELLER_CLIENT_ID }}
GH_SELLER_TOKEN_SIGNER=${{ secrets.SELLER_TOKEN_SIGNER }}
GH_SERVER_MNEMONIC=${{ secrets.SERVER_MNEMONIC }}
GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=https://sub-data-hub.subsocial.network/graphql
GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=wss://sub-data-hub.subsocial.network/graphql-ws
GH_DATAHUB_QUEUE_URL=https://sub-queue-data-hub.subsocial.network/graphql
GH_DATAHUB_QUEUE_TOKEN=${{ secrets.DATAHUB_QUEUE_TOKEN }}
tags: |
${{ env.image }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/feature-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
GH_CONNECTION_KIND=dev
GH_SELLER_CLIENT_ID=5DYm3Wk4aa1BbfhH1ajmY6MNEELXoicmKRnP4tzHYjSKnD9K
GH_SELLER_TOKEN_SIGNER=retire strong pole intact cool music high path salt praise stadium spatial
GH_SERVER_MNEMONIC=plunge pumpkin penalty segment cattle more print below fat lemon clap uniform
GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=https://super-likes-fixed-data-hub.subsocial.network/graphql
GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=wss://super-likes-fixed-data-hub.subsocial.network/graphql-ws
GH_DATAHUB_QUEUE_URL=https://super-likes-fixed-queue-data-hub.subsocial.network/graphql
GH_DATAHUB_QUEUE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZX0.jpXwkIJ4DpV4IvSI3eWVVXE6x89qr_GIq7IlbBv5YE0
tags: |
${{ env.image }}
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
5 changes: 0 additions & 5 deletions ci.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ NEXT_PUBLIC_OFFCHAIN_SIGNER_URL='$GH_OFFCHAIN_SIGNER_URL'
NEXT_PUBLIC_AMP_ID='$GH_AMP_ID'
SELLER_CLIENT_ID='$GH_SELLER_CLIENT_ID'
SELLER_CLIENT_TOKEN_SIGNER='$GH_SELLER_TOKEN_SIGNER'
NEXT_PUBLIC_DATAHUB_QUERY_URL='GH_NEXT_PUBLIC_DATAHUB_QUERY_URL'
NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL='GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL'
DATAHUB_QUEUE_URL='GH_DATAHUB_QUEUE_URL'
DATAHUB_QUEUE_TOKEN='GH_DATAHUB_QUEUE_TOKEN'
SERVER_MNEMONIC='GH_SERVER_MNEMONIC'
15 changes: 15 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3003',
env: {
my_address: '3shk6xYyNwwL5yvDVCUoUVoa8iUu3QmsR64kVqi2jL25kyzf',
my_space: '5496',
my_post: '36193',

fresh_account: '5HbAUnWjfS6xix33S5RMi1R99oG2TDMraQSRY4bP3fvycbSa',
account_with_energy: '5FHYXx3iHURLfdNk5svSQMuZA7nvzsk5CfwFtQMtivYWcYjG',
},
},
})
24 changes: 2 additions & 22 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ ARG GH_AMP_ID
ARG GH_OFFCHAIN_SIGNER_URL
ARG GH_SELLER_CLIENT_ID
ARG GH_SELLER_TOKEN_SIGNER
ARG GH_NEXT_PUBLIC_DATAHUB_QUERY_URL
ARG GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL
ARG GH_DATAHUB_QUEUE_URL
ARG GH_DATAHUB_QUEUE_TOKEN
ARG GH_SERVER_MNEMONIC

ENV NEXT_PUBLIC_GA_ID=${GH_GA_ID} \
NEXT_PUBLIC_APP_KIND=${GH_APP_KIND} \
Expand All @@ -23,12 +18,7 @@ ENV NEXT_PUBLIC_GA_ID=${GH_GA_ID} \
NEXT_PUBLIC_OFFCHAIN_SIGNER_URL=${GH_OFFCHAIN_SIGNER_URL} \
NEXT_PUBLIC_CONNECTION_KIND=${GH_CONNECTION_KIND} \
SELLER_CLIENT_ID=${GH_SELLER_CLIENT_ID} \
SELLER_CLIENT_TOKEN_SIGNER=${GH_SELLER_TOKEN_SIGNER} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=${GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL} \
DATAHUB_QUEUE_URL=${GH_DATAHUB_QUEUE_URL} \
DATAHUB_QUEUE_TOKEN=${GH_DATAHUB_QUEUE_TOKEN} \
SERVER_MNEMONIC=${GH_SERVER_MNEMONIC}
SELLER_CLIENT_TOKEN_SIGNER=${GH_SELLER_TOKEN_SIGNER}

COPY package.json yarn.lock* ./
RUN yarn install --no-optional
Expand All @@ -52,11 +42,6 @@ ARG GH_AMP_ID
ARG GH_OFFCHAIN_SIGNER_URL
ARG GH_SELLER_CLIENT_ID
ARG GH_SELLER_TOKEN_SIGNER
ARG GH_NEXT_PUBLIC_DATAHUB_QUERY_URL
ARG GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL
ARG GH_DATAHUB_QUEUE_URL
ARG GH_DATAHUB_QUEUE_TOKEN
ARG GH_SERVER_MNEMONIC

ENV NEXT_PUBLIC_GA_ID=${GH_GA_ID} \
NEXT_PUBLIC_APP_KIND=${GH_APP_KIND} \
Expand All @@ -65,12 +50,7 @@ ENV NEXT_PUBLIC_GA_ID=${GH_GA_ID} \
NEXT_PUBLIC_OFFCHAIN_SIGNER_URL=${GH_OFFCHAIN_SIGNER_URL} \
NEXT_PUBLIC_CONNECTION_KIND=${GH_CONNECTION_KIND} \
SELLER_CLIENT_ID=${GH_SELLER_CLIENT_ID} \
SELLER_CLIENT_TOKEN_SIGNER=${GH_SELLER_TOKEN_SIGNER} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=${GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL} \
DATAHUB_QUEUE_URL=${GH_DATAHUB_QUEUE_URL} \
DATAHUB_QUEUE_TOKEN=${GH_DATAHUB_QUEUE_TOKEN} \
SERVER_MNEMONIC=${GH_SERVER_MNEMONIC}
SELLER_CLIENT_TOKEN_SIGNER=${GH_SELLER_TOKEN_SIGNER}

WORKDIR /opt/subsocial/app

Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@typescript-eslint/parser": "^5.45.0",
"@welldone-software/why-did-you-render": "^6.2.1",
"apollo": "^2.34.0",
"cypress": "^10.11.0",
"cypress-network-idle": "^1.10.2",
"cypress-wait-until": "^1.7.2",
"eslint": "^8.46.0",
Expand Down Expand Up @@ -89,7 +90,6 @@
"@polkadot/ui-keyring": "^2.9.8",
"@reduxjs/toolkit": "^1.3.4",
"@subsocial/api": "0.8.10",
"@subsocial/data-hub-sdk": "dappforce/subsocial-data-hub-sdk#staging",
"@subsocial/definitions": "0.8.10",
"@subsocial/elasticsearch": "0.8.10",
"@subsocial/grill-widget": "^0.0.13",
Expand Down Expand Up @@ -122,9 +122,7 @@
"graphql": "^15.5.0",
"graphql-request": "^5.2.0",
"graphql-tag": "^2.11.0",
"graphql-ws": "^5.14.3",
"isbot": "^3.0.14",
"isomorphic-ws": "^5.0.0",
"jdenticon": "^3.2.0",
"jwt-decode": "^3.1.2",
"localforage": "^1.7.4",
Expand All @@ -148,7 +146,7 @@
"react-embed": "^3.6.0",
"react-ga": "^3.3.0",
"react-hook-form": "~5.6.0",
"react-icons": "^4.12.0",
"react-icons": "^4.4.0",
"react-infinite-scroll-component": "^6.1.0",
"react-lite-youtube-embed": "^2.4.0",
"react-markdown": "6.0.3",
Expand All @@ -162,7 +160,6 @@
"store": "^2.0.12",
"strip-markdown": "^4.0.0",
"url-loader": "^4.1.1",
"yup": "^0.32.9",
"zod": "^3.22.4"
"yup": "^0.32.9"
}
}
Binary file removed public/images/creators/subsocial-tokens-large.png
Binary file not shown.
4 changes: 2 additions & 2 deletions public/images/databases.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions public/images/diamond.svg

This file was deleted.

Binary file removed public/images/wallets/nova-wallet.jpeg
Binary file not shown.
2 changes: 0 additions & 2 deletions src/components/auth/MyAccountsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
signOut,
unsetMyEmailAddress,
} from 'src/rtk/features/accounts/myAccountSlice'
import { fetchAddressLikeCounts } from 'src/rtk/features/activeStaking/addressLikeCountSlice'
import { fetchChainsInfo } from 'src/rtk/features/chainsInfo/chainsInfoSlice'
import { fetchProfileSpace } from 'src/rtk/features/profiles/profilesSlice'
import { fetchEntityOfSpaceIdsByFollower } from 'src/rtk/features/spaceIds/followedSpaceIdsSlice'
Expand Down Expand Up @@ -149,7 +148,6 @@ export function MyAccountsProvider(props: React.PropsWithChildren<{}>) {
dispatch(fetchProfileSpace({ id: address, api: subsocial })),
dispatch(fetchEntityOfSpaceIdsByFollower({ id: address, reload: true, api: subsocial })),
dispatch(fetchChainsInfo({})),
dispatch(fetchAddressLikeCounts({ address, postIds: null })),
])

unsubAccountInfo = await readyApi.query.system.account(
Expand Down
25 changes: 1 addition & 24 deletions src/components/auth/WalletButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Link from 'next/link'
import { hasInjectedWallet } from 'src/utils/window'
import { AvatarOrSkeleton, isClientSide } from '../utils'
import { AvatarOrSkeleton } from '../utils'
import { StepsEnum } from './AuthContext'
import styles from './WalletButton.module.sass'

Expand All @@ -13,27 +11,6 @@ const WalletButton = ({ setCurrentStep }: Props) => {
setCurrentStep(StepsEnum.SelectAccount)
}

const isInMobileWalletBrowser = isClientSide() && hasInjectedWallet()
if (!isInMobileWalletBrowser) {
return (
<Link passHref href='https://novawallet.io/'>
<a className={styles.WalletButton} target='_blank'>
<div className='d-flex align-items-center'>
<AvatarOrSkeleton
externalIcon
icon={'/images/wallets/nova-wallet.jpeg'}
size={'default'}
className='mr-2 align-items-start'
/>
<div className='font-weight-bold pl-1' style={{ color: 'black' }}>
Install Nova Wallet
</div>
</div>
</a>
</Link>
)
}

return (
<div className={styles.WalletButton} onClick={() => handleClick()}>
<div className='d-flex align-items-center'>
Expand Down
45 changes: 18 additions & 27 deletions src/components/auth/signIn/SignInModal.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React, { useState } from 'react'
import LoadingTransaction from 'src/components/utils/LoadingTransaction'
import WalletButton from '../WalletButton'

import { ArrowLeftOutlined } from '@ant-design/icons'
import { Button } from 'antd'
import Modal from 'antd/lib/modal'
import clsx from 'clsx'
import React, { useState } from 'react'
import { useIsMobileWidthOrDevice, useResponsiveSize } from 'src/components/responsive'
import LoadingTransaction from 'src/components/utils/LoadingTransaction'
import { useResponsiveSize } from 'src/components/responsive'
import { setCurrentEmailAddress } from 'src/components/utils/OffchainSigner/ExternalStorage'
import config from 'src/config'
import { EmailAccount } from 'src/types'
import { hasInjectedWallet } from 'src/utils/window'
import { AccountSelector } from '../../profile-selector/AccountSelector'
import ExternalLink from '../../spaces/helpers/ExternalLink'
import { MutedDiv } from '../../utils/MutedText'
import PrivacyPolicyLinks from '../../utils/PrivacyPolicyLinks'
import WalletList from '../../wallets/wallet-list/WalletsList'
import { CompletedSteps, StepsEnum, useAuth } from '../AuthContext'
import { useMyAccountsContext } from '../MyAccountsContext'
import WalletButton from '../WalletButton'
import ConfirmationModalContent from './email/ConfirmationModalContent'
import ShowMnemonicModalContent from './email/ShowMnemonicModalContent'
import SignInEmailButton from './email/SignInEmailButton'
Expand Down Expand Up @@ -190,7 +190,19 @@ const ModalContent = ({
case StepsEnum.SelectWallet: {
return (
<div>
<ModalBodyWrapper title='Sign In' desc={<SignInDesc />}>
<ModalBodyWrapper
title='Sign In'
desc={
<>
Choose one of the available wallet providers to connect to {config.appName}, or sign
in with your email address.{' '}
<ExternalLink
url='https://docs.subsocial.network/docs/tutorials/#polkadotjs'
value='How do I set up a wallet?'
/>
</>
}
>
{config.enableConfirmationLessMode ? (
<>
<SignInEmailButton setCurrentStep={setCurrentStep} />
Expand Down Expand Up @@ -302,27 +314,6 @@ const ModalContent = ({
}
}

function SignInDesc() {
const isMobile = useIsMobileWidthOrDevice()
if (isMobile) {
if (hasInjectedWallet()) {
return <>To use Polkaverse, you need to connect your wallet</>
}
return (
<>To use PolkaVerse, you need a wallet to manage your account. We recommend Nova Wallet.</>
)
}
return (
<>
Choose one of the available wallet providers to connect to {config.appName}.{' '}
<ExternalLink
url='https://docs.subsocial.network/docs/tutorials/#polkadotjs'
value='How do I set up a wallet?'
/>
</>
)
}

export const SignInModalView = ({ open, hide, onAccountChosen }: SignInModalProps) => {
const {
state: { completedSteps, currentStep },
Expand Down
Loading

0 comments on commit 979e99d

Please sign in to comment.