Skip to content

Commit 392dad7

Browse files
remove more ads
1 parent 0762499 commit 392dad7

15 files changed

+0
-508
lines changed

deploy/tools/envs-validator/schema.ts

-36
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ declare module 'yup' {
99

1010
import * as yup from 'yup';
1111

12-
import type { AdButlerConfig } from '../../../types/client/adButlerConfig';
1312
import type { AddressProfileAPIConfig } from '../../../types/client/addressProfileAPIConfig';
1413
import { SUPPORTED_AD_TEXT_PROVIDERS, SUPPORTED_AD_BANNER_PROVIDERS, SUPPORTED_AD_BANNER_ADDITIONAL_PROVIDERS } from '../../../types/client/adProviders';
1514
import type { AdTextProviders, AdBannerProviders, AdBannerAdditionalProviders } from '../../../types/client/adProviders';
@@ -424,40 +423,6 @@ const celoSchema = yup
424423
}),
425424
});
426425

427-
const adButlerConfigSchema = yup
428-
.object<AdButlerConfig>()
429-
.transform(replaceQuotes)
430-
.json()
431-
.when('NEXT_PUBLIC_AD_BANNER_PROVIDER', {
432-
is: (value: AdBannerProviders) => value === 'adbutler',
433-
then: (schema) => schema
434-
.shape({
435-
id: yup.string().required(),
436-
width: yup.number().positive().required(),
437-
height: yup.number().positive().required(),
438-
})
439-
.required(),
440-
})
441-
.when('NEXT_PUBLIC_AD_BANNER_ADDITIONAL_PROVIDER', {
442-
is: (value: AdBannerProviders) => value === 'adbutler',
443-
then: (schema) => schema
444-
.shape({
445-
id: yup.string().required(),
446-
width: yup.number().positive().required(),
447-
height: yup.number().positive().required(),
448-
})
449-
.required(),
450-
});
451-
452-
const adsBannerSchema = yup
453-
.object()
454-
.shape({
455-
NEXT_PUBLIC_AD_BANNER_PROVIDER: yup.string<AdBannerProviders>().oneOf(SUPPORTED_AD_BANNER_PROVIDERS),
456-
NEXT_PUBLIC_AD_BANNER_ADDITIONAL_PROVIDER: yup.string<AdBannerAdditionalProviders>().oneOf(SUPPORTED_AD_BANNER_ADDITIONAL_PROVIDERS),
457-
NEXT_PUBLIC_AD_ADBUTLER_CONFIG_DESKTOP: adButlerConfigSchema,
458-
NEXT_PUBLIC_AD_ADBUTLER_CONFIG_MOBILE: adButlerConfigSchema,
459-
});
460-
461426
// DEPRECATED
462427
const sentrySchema = yup
463428
.object()
@@ -1053,7 +1018,6 @@ const schema = yup
10531018
NEXT_PUBLIC_USE_NEXT_JS_PROXY: yup.boolean(),
10541019
})
10551020
.concat(accountSchema)
1056-
.concat(adsBannerSchema)
10571021
.concat(marketplaceSchema)
10581022
.concat(rollupSchema)
10591023
.concat(celoSchema)

nextjs/csp/policies/ad.ts

-38
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import Base64 from 'crypto-js/enc-base64';
2-
import sha256 from 'crypto-js/sha256';
31
import type CspDev from 'csp-dev';
42

5-
import { connectAdbutler, placeAd } from 'ui/shared/ad/adbutlerScript';
6-
import { hypeInit } from 'ui/shared/ad/hypeBannerScript';
7-
83
export function ad(): CspDev.DirectiveDescriptor {
94
return {
105
'connect-src': [
@@ -28,38 +23,5 @@ export function ad(): CspDev.DirectiveDescriptor {
2823
'v1.getittech.io',
2924
'ipapi.co',
3025
],
31-
'frame-src': [
32-
// coinzilla
33-
'https://request-global.czilladx.com',
34-
],
35-
'script-src': [
36-
// coinzilla
37-
'coinzillatag.com',
38-
39-
// adbutler
40-
'servedbyadbutler.com',
41-
`'sha256-${ Base64.stringify(sha256(connectAdbutler)) }'`,
42-
`'sha256-${ Base64.stringify(sha256(placeAd(undefined) ?? '')) }'`,
43-
`'sha256-${ Base64.stringify(sha256(placeAd('mobile') ?? '')) }'`,
44-
45-
// slise
46-
'*.slise.xyz',
47-
48-
//hype
49-
`'sha256-${ Base64.stringify(sha256(hypeInit ?? '')) }'`,
50-
'https://api.hypelab.com',
51-
'd1q98dzwj6s2rb.cloudfront.net',
52-
],
53-
'img-src': [
54-
// coinzilla
55-
'cdn.coinzilla.io',
56-
57-
// adbutler
58-
'servedbyadbutler.com',
59-
],
60-
'font-src': [
61-
// coinzilla
62-
'https://request-global.czilladx.com',
63-
],
6426
};
6527
}

ui/home/HeroBanner.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react';
33

44
import config from 'configs/app';
55
import RewardsButton from 'ui/rewards/RewardsButton';
6-
import AdBanner from 'ui/shared/ad/AdBanner';
76
import SearchBar from 'ui/snippets/searchBar/SearchBar';
87
import UserProfileDesktop from 'ui/snippets/user/profile/UserProfileDesktop';
98
import UserWalletDesktop from 'ui/snippets/user/wallet/UserWalletDesktop';
@@ -79,7 +78,6 @@ const HeroBanner = () => {
7978
</Flex>
8079
<SearchBar isHomepage/>
8180
</Box>
82-
<AdBanner platform="mobile" w="fit-content" flexShrink={ 0 } borderRadius="md" overflow="hidden" display={{ base: 'none', lg: 'block ' }}/>
8381
</Flex>
8482
);
8583
};

ui/pages/Home.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import LatestZkEvmL2Batches from 'ui/home/latestBatches/LatestZkEvmL2Batches';
99
import LatestBlocks from 'ui/home/LatestBlocks';
1010
import Stats from 'ui/home/Stats';
1111
import Transactions from 'ui/home/Transactions';
12-
import AdBanner from 'ui/shared/ad/AdBanner';
1312

1413
const rollupFeature = config.features.rollup;
1514

@@ -35,7 +34,6 @@ const Home = () => {
3534
<Stats/>
3635
<ChainIndicators/>
3736
</Flex>
38-
<AdBanner mt={ 6 } mx="auto" display={{ base: 'flex', lg: 'none' }} justifyContent="center"/>
3937
<Flex mt={ 8 } direction={{ base: 'column', lg: 'row' }} columnGap={ 12 } rowGap={ 6 }>
4038
{ leftWidget }
4139
<Box flexGrow={ 1 }>

ui/pages/RewardsDashboard.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import DailyRewardClaimButton from 'ui/rewards/dashboard/DailyRewardClaimButton'
88
import RewardsDashboardCard from 'ui/rewards/dashboard/RewardsDashboardCard';
99
import RewardsDashboardCardValue from 'ui/rewards/dashboard/RewardsDashboardCardValue';
1010
import RewardsReadOnlyInputWithCopy from 'ui/rewards/RewardsReadOnlyInputWithCopy';
11-
import AdBanner from 'ui/shared/ad/AdBanner';
1211
import Skeleton from 'ui/shared/chakra/Skeleton';
1312
import LinkExternal from 'ui/shared/links/LinkExternal';
1413
import PageTitle from 'ui/shared/Page/PageTitle';
@@ -57,7 +56,6 @@ const RewardsDashboard = () => {
5756
</span>
5857
) }
5958
/>
60-
<AdBanner platform="mobile" w="fit-content" flexShrink={ 0 } borderRadius="md" overflow="hidden" display={{ base: 'none', lg: 'block ' }}/>
6159
</Flex>
6260
<Flex flexDirection="column" alignItems="flex-start" w="full" gap={ 6 }>
6361
{ isError && <Alert status="error">Failed to load some data. Please try again later.</Alert> }

ui/shared/AppError/AppError.tsx

-7
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ import React from 'react';
33

44
import { route } from 'nextjs-routes';
55

6-
import config from 'configs/app';
76
import getErrorCause from 'lib/errors/getErrorCause';
87
import getErrorCauseStatusCode from 'lib/errors/getErrorCauseStatusCode';
98
import getErrorObjStatusCode from 'lib/errors/getErrorObjStatusCode';
109
import getResourceErrorPayload from 'lib/errors/getResourceErrorPayload';
11-
import AdBannerContent from 'ui/shared/ad/AdBannerContent';
1210

1311
import AppErrorIcon from './AppErrorIcon';
1412
import AppErrorTitle from './AppErrorTitle';
1513
import AppErrorBlockConsensus from './custom/AppErrorBlockConsensus';
1614
import AppErrorTooManyRequests from './custom/AppErrorTooManyRequests';
1715
import AppErrorTxNotFound from './custom/AppErrorTxNotFound';
1816

19-
const adBannerConfig = config.features.adsBanner;
20-
2117
interface Props {
2218
className?: string;
2319
error: Error | undefined;
@@ -81,8 +77,6 @@ const AppError = ({ error, className }: Props) => {
8177
default: {
8278
const { title, text } = ERROR_TEXTS[String(statusCode)] ?? ERROR_TEXTS[500];
8379

84-
const adBannerProvider = adBannerConfig.isEnabled ? adBannerConfig.provider : null;
85-
8680
return (
8781
<>
8882
<AppErrorIcon statusCode={ statusCode }/>
@@ -97,7 +91,6 @@ const AppError = ({ error, className }: Props) => {
9791
>
9892
Back to home
9993
</Button>
100-
{ statusCode === 404 && adBannerProvider && <AdBannerContent mt={ 12 } provider={ adBannerProvider }/> }
10194
</>
10295
);
10396
}

ui/shared/ad/AdBanner.tsx

-39
This file was deleted.

ui/shared/ad/AdBannerContent.tsx

-48
This file was deleted.

ui/shared/ad/AdbutlerBanner.tsx

-104
This file was deleted.

0 commit comments

Comments
 (0)