@@ -15,11 +15,11 @@ import ReleaseDeed from './ReleaseDeed'
1515
1616const CloseLink = styled ( 'a' ) `
1717 position: relative;
18- cursor:pointer;
18+ cursor: pointer;
1919 ${ mq . small `
2020 top:-46px;
2121 ` }
22- `
22+ `
2323
2424const MigrationInstruction = styled ( 'h3' ) `
2525 margin: 0;
@@ -63,7 +63,8 @@ const MigrationIcon = styled(DefaultMigrationIcon)`
6363
6464const TransferDetail = styled ( DetailsItem ) `
6565 padding: 20px;
66- background-color: ${ props => props . condition === 'warning' ? '#fef6e9' : '#f0f6fa' } ;
66+ background-color: ${ props =>
67+ props . condition === 'warning' ? '#fef6e9' : '#f0f6fa' } ;
6768 position: relative;
6869 padding-top: 65px;
6970 margin-bottom: 25px;
@@ -87,37 +88,42 @@ const Action = styled('div')`
8788 ` }
8889`
8990
90- const LearnMoreLink = styled ( 'a' ) `
91- `
91+ const LearnMoreLink = styled ( 'a' ) ``
9292
9393const LearnMore = ( ) => (
9494 < LearnMoreLink
9595 // Temp link until we get better blog post explaining the detail.
96- href = "https://medium.com/the-ethereum-name-service/the-future-of-ens-as-explained-in-our-ethcc-talks-videos-inside-395fbaaa6cad "
96+ href = "https://docs.ens.domains/permanent-registrar-faq "
9797 target = "_blank"
9898 >
9999 Learn More
100100 </ LearnMoreLink >
101101)
102102
103- const ReleaseInstead = ( { label, refetch} ) => (
103+ const ReleaseInstead = ( { label, refetch } ) => (
104104 < MigrationExplanation >
105105 < ReleaseDeed
106106 label = { label }
107107 refetch = { refetch }
108- actionText = ' Release'
109- actionType = ' link'
110- explanation = ' You will no longer have ownership of this name'
108+ actionText = " Release"
109+ actionType = " link"
110+ explanation = " You will no longer have ownership of this name"
111111 /> { ' ' }
112112 the domain to get your locked ETH back if you don’t want it anymore.
113- </ MigrationExplanation >
113+ </ MigrationExplanation >
114114)
115115
116- function displayMigrationDiralogue ( { parent, isOwner, isDeedOwner, isNewRegistrar, confirmed} ) {
116+ function displayMigrationDiralogue ( {
117+ parent,
118+ isOwner,
119+ isDeedOwner,
120+ isNewRegistrar,
121+ confirmed
122+ } ) {
117123 return (
118- parent === 'eth' &&
119- ( ( isOwner || isDeedOwner ) && ! isNewRegistrar )
120- ) || confirmed
124+ ( parent === 'eth' && ( ( isOwner || isDeedOwner ) && ! isNewRegistrar ) ) ||
125+ confirmed
126+ )
121127}
122128
123129function TransferRegistrars ( {
@@ -141,8 +147,9 @@ function TransferRegistrars({
141147 Congratulations on Migrating your domain!
142148 </ MigrationInstruction >
143149 < MigrationExplanation >
144- You successfully migrated this domain to the new ENS Permanent Registrar.
145- We've sent back to you the ETH that you had locked in the older registrar contract.
150+ You successfully migrated this domain to the new ENS Permanent
151+ Registrar. We've sent back to you the ETH that you had locked in the
152+ older registrar contract.
146153 </ MigrationExplanation >
147154 </ >
148155 )
@@ -153,15 +160,13 @@ function TransferRegistrars({
153160 Be Ready! ENS is migrating to a new Registrar.
154161 </ MigrationInstruction >
155162 < MigrationExplanation >
156- This domain is currently recorded in the old ENS Registrar which will be discontinued after 2019.05.04.
157- Migrate to the new ENS Registrar between{ ' ' }
163+ This domain is currently recorded in the old ENS Registrar which will be
164+ discontinued after 2019.05.04. Migrate to the new ENS Registrar between{ ' ' }
158165 < strong >
159166 { formatDate ( migrationStartDate , true ) } -{ ' ' }
160167 { formatDate ( transferEndDate , true ) }
161- </ strong >
162- { ' ' }
163- if you want to keep your domain.
164- { ' ' } < LearnMore />
168+ </ strong > { ' ' }
169+ if you want to keep your domain. < LearnMore />
165170 </ MigrationExplanation >
166171 < ReleaseInstead label = { label } refetch = { refetch } />
167172 </ >
@@ -173,22 +178,24 @@ function TransferRegistrars({
173178 Migration period ended { formatDate ( transferEndDate , true ) }
174179 </ MigrationInstruction >
175180 < MigrationExplanation >
176- You no longer own this name and it has been made available for registration in the new ENS Permanent Registrar.
177- You can release the domain from the older registrar to get your locked ETH back and register it again in the new ENS Permanent Registrar.
178- { ' ' } < LearnMore />
181+ You no longer own this name and it has been made available for
182+ registration in the new ENS Permanent Registrar. You can release the
183+ domain from the older registrar to get your locked ETH back and register
184+ it again in the new ENS Permanent Registrar. < LearnMore />
179185 </ MigrationExplanation >
180186 </ >
181187 )
182188
183189 const MigrateNow = (
184190 < >
185191 < MigrationInstruction >
186- Migrate your name to the Permanent Registrar.
192+ Migrate your name to the Permanent Registrar.
187193 </ MigrationInstruction >
188194 < MigrationExplanation >
189- Migrate now to get your locked ETH back and free registration for one year.
190- If you do not migrate by < strong > { formatDate ( transferEndDate , true ) } </ strong > , you will lose your domain, and others will be able to register it.
191- { ' ' } < LearnMore />
195+ Migrate now to get your locked ETH back and free registration for one
196+ year. If you do not migrate by{ ' ' }
197+ < strong > { formatDate ( transferEndDate , true ) } </ strong > , you will lose your
198+ domain, and others will be able to register it. < LearnMore />
192199 </ MigrationExplanation >
193200 < ReleaseInstead label = { label } refetch = { refetch } />
194201 </ >
@@ -198,9 +205,9 @@ function TransferRegistrars({
198205 < ReleaseDeed
199206 label = { label }
200207 refetch = { refetch }
201- actionText = ' Release'
202- actionType = ' button'
203- explanation = ' You already lost ownership of this name but will get ETH back'
208+ actionText = " Release"
209+ actionType = " button"
210+ explanation = " You already lost ownership of this name but will get ETH back"
204211 />
205212 )
206213
@@ -222,42 +229,50 @@ function TransferRegistrars({
222229 startPending ( Object . values ( data ) [ 0 ] )
223230 } }
224231 >
225- { mutate => < TransferButton
226- onClick = { mutate }
227- type = "hollow-primary"
228- > Migrate </ TransferButton >
229- }
232+ { mutate => (
233+ < TransferButton onClick = { mutate } type = "hollow-primary" >
234+ Migrate
235+ </ TransferButton >
236+ ) }
230237 </ Mutation >
231238 ) }
232239 </ >
233240 )
234241
235242 let CurrentMigrationInstruction , CurrentAction , condition
236- if ( confirmed ) {
243+ if ( confirmed ) {
237244 CurrentMigrationInstruction = MigrationConfirmed
238245 CurrentAction = < CloseLink onClick = { stopEditing } > x</ CloseLink >
239- } else {
246+ } else {
240247 if ( currentBlockDate < migrationStartDate ) {
241248 CurrentMigrationInstruction = TooEarly
242- CurrentAction = < TransferButton type = "hollow-primary-disabled" > Migrate</ TransferButton >
249+ CurrentAction = (
250+ < TransferButton type = "hollow-primary-disabled" > Migrate</ TransferButton >
251+ )
243252 condition = 'warning'
244253 } else if ( currentBlockDate < transferEndDate ) {
245254 CurrentMigrationInstruction = MigrateNow
246255 CurrentAction = MigrateAction
247256 condition = 'warning'
248- } else if ( currentBlockDate >= transferEndDate ) {
257+ } else if ( currentBlockDate >= transferEndDate ) {
249258 CurrentMigrationInstruction = TooLate
250259 CurrentAction = ReleaseAction
251- }
260+ }
252261 }
253- return (
254- displayMigrationDiralogue ( { parent, isOwner, isDeedOwner, isNewRegistrar, confirmed} ) ? (
255- < TransferDetail condition = { condition } >
256- < MigrationIcon />
257- { CurrentMigrationInstruction }
258- < Action > { CurrentAction } </ Action >
259- </ TransferDetail >
260- ) : ''
262+ return displayMigrationDiralogue ( {
263+ parent,
264+ isOwner,
265+ isDeedOwner,
266+ isNewRegistrar,
267+ confirmed
268+ } ) ? (
269+ < TransferDetail condition = { condition } >
270+ < MigrationIcon />
271+ { CurrentMigrationInstruction }
272+ < Action > { CurrentAction } </ Action >
273+ </ TransferDetail >
274+ ) : (
275+ ''
261276 )
262277}
263278
0 commit comments