Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: add tba support" #4129

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 0 additions & 23 deletions apps/web/src/components/Common/Providers/TbaStatusProvider.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions apps/web/src/components/Common/Providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import LeafwatchProvider from './LeafwatchProvider';
import LensSubscriptionsProvider from './LensSubscriptionsProvider';
import PreferencesProvider from './PreferencesProvider';
import ServiceWorkerProvider from './ServiceWorkerProvider';
import TbaStatusProvider from './TbaStatusProvider';
import Web3Provider from './Web3Provider';

const lensApolloClient = apolloClient(authLink);
Expand All @@ -39,7 +38,6 @@ const Providers = ({ children }: { children: ReactNode }) => {
<LensSubscriptionsProvider />
<QueryClientProvider client={queryClient}>
<PreferencesProvider />
<TbaStatusProvider />
<FeaturedGroupsProvider />
<LivepeerConfig client={livepeerClient} theme={getLivepeerTheme}>
<ThemeProvider attribute="class" defaultTheme="light">
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/components/Profile/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import ProfileMenu from './Menu';
import MutualFollowers from './MutualFollowers';
import MutualFollowersList from './MutualFollowers/List';
import ScamWarning from './ScamWarning';
import TbaBadge from './TbaBadge';

interface DetailsProps {
profile: Profile;
Expand Down Expand Up @@ -104,7 +103,6 @@ const Details: FC<DetailsProps> = ({ profile }) => {
<CheckBadgeIcon className="text-brand-500 h-6 w-6" />
</Tooltip>
) : null}
<TbaBadge profile={profile} />
{hasMisused(profile.id) ? (
<Tooltip content={misuseDetails?.type}>
<ExclamationCircleIcon className="h-6 w-6 text-red-500" />
Expand Down
36 changes: 0 additions & 36 deletions apps/web/src/components/Profile/TbaBadge.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { useState } from 'react';
import toast from 'react-hot-toast';
import { useNonceStore } from 'src/store/non-persisted/useNonceStore';
import useProfileStore from 'src/store/persisted/useProfileStore';
import { hydrateTbaStatus } from 'src/store/persisted/useTbaStatusStore';
import { useContractWrite, useSignTypedData } from 'wagmi';

interface ToggleLensManagerProps {
Expand All @@ -37,8 +36,6 @@ const ToggleLensManager: FC<ToggleLensManagerProps> = ({
(state) => state.setLensHubOnchainSigNonce
);
const [isLoading, setIsLoading] = useState(false);

const { isTba } = hydrateTbaStatus();
const { canBroadcast, canUseSignless } =
checkDispatcherPermissions(currentProfile);

Expand Down Expand Up @@ -97,7 +94,7 @@ const ToggleLensManager: FC<ToggleLensManagerProps> = ({
switchToGivenConfig
];

if (!isTba && canBroadcast) {
if (canBroadcast) {
const { data } = await broadcastOnchain({
variables: { request: { id, signature } }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import toast from 'react-hot-toast';
import useHandleWrongNetwork from 'src/hooks/useHandleWrongNetwork';
import { useNonceStore } from 'src/store/non-persisted/useNonceStore';
import useProfileStore from 'src/store/persisted/useProfileStore';
import { hydrateTbaStatus } from 'src/store/persisted/useTbaStatusStore';
import { isAddress } from 'viem';
import { useContractWrite, useSignTypedData } from 'wagmi';

Expand All @@ -43,8 +42,6 @@ const AddProfileManager: FC<AddProfileManagerProps> = ({
const [isLoading, setIsLoading] = useState(false);

const handleWrongNetwork = useHandleWrongNetwork();

const { isTba } = hydrateTbaStatus();
const { canBroadcast } = checkDispatcherPermissions(currentProfile);

const onCompleted = (__typename?: 'RelayError' | 'RelaySuccess') => {
Expand Down Expand Up @@ -102,7 +99,7 @@ const AddProfileManager: FC<AddProfileManagerProps> = ({
switchToGivenConfig
];

if (!isTba && canBroadcast) {
if (canBroadcast) {
const signature = await signTypedDataAsync(getSignature(typedData));
const { data } = await broadcastOnchain({
variables: { request: { id, signature } }
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/store/persisted/useAuthStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export const useAuthStore = create(
(value) =>
value !== IndexDB.AlgorithmStore &&
value !== IndexDB.VerifiedMembersStore &&
value !== IndexDB.FeaturedGroupsStore &&
value !== IndexDB.TBAStore
value !== IndexDB.FeaturedGroupsStore
);
await delMany(allIndexedDBStores);
}
Expand Down
30 changes: 0 additions & 30 deletions apps/web/src/store/persisted/useTbaStatusStore.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/data/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ export const IndexDB = {
FeaturedGroupsStore: 'featuredgroups.store',
FeatureFlagsStore: 'featureflags.store',
ProfileStore: 'profile.store',
TBAStore: 'tba.store',
VerifiedMembersStore: 'verifiedmembers.store'
};
31 changes: 0 additions & 31 deletions packages/lib/api/getTbaStatus.ts

This file was deleted.