Skip to content

Commit 6aed40e

Browse files
committed
adding blocked addresses list
1 parent 47576dc commit 6aed40e

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

src/components/BlockedAddress.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react'
2+
import styled from 'styled-components'
3+
4+
const BlockedAddress = () => {
5+
return (
6+
<Container>
7+
<Box>Sorry, you cannot use the app!</Box>
8+
</Container>
9+
)
10+
}
11+
12+
export default BlockedAddress
13+
14+
const Box = styled.div`
15+
background: ${(props) => props.theme.colors.colorSecondary};
16+
padding: 30px;
17+
border-radius: 10px;
18+
text-align: center;
19+
margin-top: 100px;
20+
`
21+
22+
const Container = styled.div`
23+
max-width: 880px;
24+
margin: 80px auto;
25+
padding: 0 15px;
26+
@media (max-width: 767px) {
27+
margin: 50px auto;
28+
}
29+
`

src/containers/Shared.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import DistributionsModal from '../components/Modals/DistributionsModal'
3737
import { ChainId } from '../utils/interfaces'
3838
import { ethers } from 'ethers'
3939
import MulticallUpdater from '../services/MulticallUpdater'
40+
import BlockedAddress from 'src/components/BlockedAddress'
41+
import { blockedAddresses } from 'src/utils/blockedAddresses'
4042

4143
interface Props {
4244
children: ReactNode
@@ -228,7 +230,12 @@ const Shared = ({ children, ...rest }: Props) => {
228230
<AlertLabel type="danger" text={t('shutdown_text')} />
229231
</AlertContainer>
230232
) : null}
231-
<Content>{children}</Content>
233+
{account && blockedAddresses.includes(account.toLowerCase()) ? (
234+
<BlockedAddress />
235+
) : (
236+
<Content>{children}</Content>
237+
)}
238+
232239
<EmptyDiv>
233240
<CookieBanner />
234241
</EmptyDiv>

src/utils/blockedAddresses.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
export const blockedAddresses = [
2+
'0x8589427373d6d84e98730d7795d8f6f8731fda16',
3+
'0x722122df12d4e14e13ac3b6895a86e84145b6967',
4+
'0xdd4c48c0b24039969fc16d1cdf626eab821d3384',
5+
'0xd90e2f925da726b50c4ed8d0fb90ad053324f31b',
6+
'0xd96f2b1c14db8458374d9aca76e26c3d18364307',
7+
'0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d',
8+
'0xd4b88df4d29f5cedd6857912842cff3b20c8cfa3',
9+
'0x910cbd523d972eb0a6f4cae4618ad62622b39dbf',
10+
'0xa160cdab225685da1d56aa342ad8841c3b53f291',
11+
'0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144',
12+
'0xf60dd140cff0706bae9cd734ac3ae76ad9ebc32a',
13+
'0x22aaa7720ddd5388a3c0a3333430953c68f1849b',
14+
'0xba214c1c1928a32bffe790263e38b4af9bfcd659',
15+
'0xb1c8094b234dce6e03f10a5b673c1d8c69739a00',
16+
'0x527653ea119f3e6a1f5bd18fbf4714081d7b31ce',
17+
'0x58e8dcc13be9780fc42e8723d8ead4cf46943df2',
18+
'0xd691f27f38b395864ea86cfc7253969b409c362d',
19+
'0xaeaac358560e11f52454d997aaff2c5731b6f8a6',
20+
'0x1356c899d8c9467c7f71c195612f8a395abf2f0a',
21+
'0xa60c772958a3ed56c1f15dd055ba37ac8e523a0d',
22+
'0x169ad27a470d064dede56a2d3ff727986b15d52b',
23+
'0x0836222f2b2b24a3f36f98668ed8f0b38d1a872f',
24+
'0xf67721a2d8f736e75a49fdd7fad2e31d8676542a',
25+
'0x9ad122c22b14202b4490edaf288fdb3c7cb3ff5e',
26+
'0x905b63fff465b9ffbf41dea908ceb12478ec7601',
27+
'0x07687e702b410fa43f4cb4af7fa097918ffd2730',
28+
'0x94a1b5cdb22c43faab4abeb5c74999895464ddaf',
29+
'0xb541fc07bc7619fd4062a54d96268525cbc6ffef',
30+
'0x12d66f87a04a9e220743712ce6d9bb1b5616b8fc',
31+
'0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936',
32+
'0x23773e65ed146a459791799d01336db287f25334',
33+
'0xd21be7248e0197ee08e0c20d4a96debdac3d20af',
34+
'0x610b717796ad172b316836ac95a2ffad065ceab4',
35+
'0x178169b423a011fff22b9e3f3abea13414ddd0f1',
36+
'0xbb93e510bbcd0b7beb5a853875f9ec60275cf498',
37+
'0x2717c5e28cf931547b621a5dddb772ab6a35b701',
38+
'0x03893a7c7463ae47d46bc7f091665f1893656003',
39+
'0xca0840578f57fe71599d29375e16783424023357',
40+
'0x58e8dcc13be9780fc42e8723d8ead4cf46943df2',
41+
'0x8589427373d6d84e98730d7795d8f6f8731fda16',
42+
'0x722122df12d4e14e13ac3b6895a86e84145b6967',
43+
'0xdd4c48c0b24039969fc16d1cdf626eab821d3384',
44+
'0xd90e2f925da726b50c4ed8d0fb90ad053324f31b',
45+
'0xd96f2b1c14db8458374d9aca76e26c3d18364307',
46+
'0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d',
47+
]

0 commit comments

Comments
 (0)