@@ -6,120 +6,23 @@ import { currentChainId } from 'src/logic/config/store/selectors'
66import { hasFeature } from 'src/logic/safe/utils/safeVersion'
77import useCachedState from 'src/utils/storage/useCachedState'
88import styles from './index.module.scss'
9+ import Countdown from './Countdown'
910
10- const BANNERS = {
11- '4' : < > 🚨 Rinkeby will be deprecated by the end of October 2022. Please migrate to Görli. 🚨</ > ,
11+ const NEW_URL = 'https://app.safe.global'
1212
13- '1313161554' : (
14- < >
15- 🚨 On < b > 17.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Aurora, during which the
16- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
17- < a
18- target = "_blank"
19- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
20- rel = "noreferrer"
21- >
22- More information
23- </ a > { ' ' }
24- 🚨
25- </ >
26- ) ,
27- '42161' : (
28- < >
29- 🚨 On < b > 17.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Arbitrum, during which the
30- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
31- < a
32- target = "_blank"
33- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
34- rel = "noreferrer"
35- >
36- More information
37- </ a > { ' ' }
38- 🚨
39- </ >
40- ) ,
41- '43114' : (
42- < >
43- 🚨 On < b > 17.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Avalanche, during which the
44- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
45- < a
46- target = "_blank"
47- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
48- rel = "noreferrer"
49- >
50- More information
51- </ a > { ' ' }
52- 🚨
53- </ >
54- ) ,
55- '10' : (
56- < >
57- 🚨 On < b > 17.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Optimism, during which the
58- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
59- < a
60- target = "_blank"
61- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
62- rel = "noreferrer"
63- >
64- More information
65- </ a > { ' ' }
66- 🚨
67- </ >
68- ) ,
69- '137' : (
70- < >
71- 🚨 On < b > 18.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Polygon, during which the
72- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
73- < a
74- target = "_blank"
75- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
76- rel = "noreferrer"
77- >
78- More information
79- </ a > { ' ' }
80- 🚨
81- </ >
82- ) ,
83- '56' : (
84- < >
85- 🚨 On < b > 18.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on BNB Smart Chain, during which the
86- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
87- < a
88- target = "_blank"
89- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
90- rel = "noreferrer"
91- >
92- More information
93- </ a > { ' ' }
94- 🚨
95- </ >
96- ) ,
97- '100' : (
98- < >
99- 🚨 On < b > 20.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Gnosis Chain, during which the
100- functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
101- < a
102- target = "_blank"
103- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
104- rel = "noreferrer"
105- >
106- More information
107- </ a > { ' ' }
108- 🚨
109- </ >
110- ) ,
111- '1' : (
13+ const redirectToNewApp = ( ) : void => {
14+ const path = window . location . pathname . replace ( / ^ \/ a p p / , '' )
15+ window . location . replace ( NEW_URL + path )
16+ }
17+
18+ const BANNERS : Record < string , ReactElement | string > = {
19+ '*' : (
11220 < >
113- 🚨 On < b > 24.10.2022 @ 9am CEST</ b > we will be undertaking indexer maintenance on Ethereum mainnet, during which
114- the functionality of this application might be restricted. Please expect downtime of 2-3 hours.{ ' ' }
115- < a
116- target = "_blank"
117- href = "https://forum.gnosis-safe.io/t/transaction-service-migration-october-2022/1550"
118- rel = "noreferrer"
119- >
120- More information
121- </ a > { ' ' }
122- 🚨
21+ ⚠️ Safe's new official URL is < a href = { NEW_URL } > app.safe.global</ a > .< br />
22+ Please update your bookmarks.{ ' ' }
23+ < Countdown seconds = { 10 } onEnd = { redirectToNewApp } >
24+ { ( count ) => < > Redirecting in { count } seconds...</ > }
25+ </ Countdown >
12326 </ >
12427 ) ,
12528}
@@ -128,7 +31,7 @@ const WARNING_BANNER = 'WARNING_BANNER'
12831
12932const PsaBanner = ( ) : ReactElement | null => {
13033 const chainId = useSelector ( currentChainId )
131- const banner = BANNERS [ chainId ]
34+ const banner = BANNERS [ chainId ] || BANNERS [ '*' ]
13235 const isEnabled = hasFeature ( WARNING_BANNER as FEATURES )
13336 const [ closed = false , setClosed ] = useCachedState < boolean > ( `${ WARNING_BANNER } _${ chainId } _closed` , true )
13437
0 commit comments