@@ -16,7 +16,11 @@ type ExportPrivKeyModalProps = {
16
16
exportedPrivKeys : string [ ] | null ;
17
17
closeModal : ( ) => void ;
18
18
} ;
19
- const ExportPrivKeyModal = ( { modalIsOpen, exportedPrivKeys, closeModal } : ExportPrivKeyModalProps ) => {
19
+ const ExportPrivKeyModal = ( {
20
+ modalIsOpen,
21
+ exportedPrivKeys,
22
+ closeModal,
23
+ } : ExportPrivKeyModalProps ) => {
20
24
return (
21
25
< Modal
22
26
isOpen = { modalIsOpen }
@@ -25,21 +29,33 @@ const ExportPrivKeyModal = ({ modalIsOpen, exportedPrivKeys, closeModal }: Expor
25
29
overlayClassName = { cstyles . modalOverlay }
26
30
>
27
31
< div className = { [ cstyles . verticalflex ] . join ( " " ) } >
28
- < div className = { cstyles . marginbottomlarge } style = { { textAlign : "center" } } >
32
+ < div
33
+ className = { cstyles . marginbottomlarge }
34
+ style = { { textAlign : "center" } }
35
+ >
29
36
Your Wallet Private Keys
30
37
</ div >
31
38
32
39
< div className = { [ cstyles . marginbottomlarge , cstyles . center ] . join ( " " ) } >
33
- These are all the private keys in your wallet. Please store them carefully!
40
+ These are all the private keys in your wallet. Please store them
41
+ carefully!
34
42
</ div >
35
43
36
44
{ exportedPrivKeys && (
37
- < TextareaAutosize value = { exportedPrivKeys . join ( "\n" ) } className = { styles . exportedPrivKeys } disabled />
45
+ < TextareaAutosize
46
+ value = { exportedPrivKeys . join ( "\n" ) }
47
+ className = { styles . exportedPrivKeys }
48
+ disabled
49
+ />
38
50
) }
39
51
</ div >
40
52
41
53
< div className = { cstyles . buttoncontainer } >
42
- < button type = "button" className = { cstyles . primarybutton } onClick = { closeModal } >
54
+ < button
55
+ type = "button"
56
+ className = { cstyles . primarybutton }
57
+ onClick = { closeModal }
58
+ >
43
59
Close
44
60
</ button >
45
61
</ div >
@@ -69,12 +85,16 @@ const ImportPrivKeyModal = ({
69
85
overlayClassName = { cstyles . modalOverlay }
70
86
>
71
87
< div className = { [ cstyles . verticalflex ] . join ( " " ) } >
72
- < div className = { cstyles . marginbottomlarge } style = { { textAlign : "center" } } >
88
+ < div
89
+ className = { cstyles . marginbottomlarge }
90
+ style = { { textAlign : "center" } }
91
+ >
73
92
Import Private Keys
74
93
</ div >
75
94
76
95
< div className = { cstyles . marginbottomlarge } >
77
- Please paste your private or viewing keys here (transparent address or shielded address), one line per key.
96
+ Please paste your private or viewing keys here (transparent address or
97
+ shielded address), one line per key.
78
98
</ div >
79
99
80
100
< div className = { cstyles . well } style = { { textAlign : "center" } } >
@@ -98,7 +118,11 @@ const ImportPrivKeyModal = ({
98
118
>
99
119
Import
100
120
</ button >
101
- < button type = "button" className = { cstyles . primarybutton } onClick = { closeModal } >
121
+ < button
122
+ type = "button"
123
+ className = { cstyles . primarybutton }
124
+ onClick = { closeModal }
125
+ >
102
126
Cancel
103
127
</ button >
104
128
</ div >
@@ -132,7 +156,10 @@ const PayURIModal = ({
132
156
overlayClassName = { cstyles . modalOverlay }
133
157
>
134
158
< div className = { [ cstyles . verticalflex ] . join ( " " ) } >
135
- < div className = { cstyles . marginbottomlarge } style = { { textAlign : "center" } } >
159
+ < div
160
+ className = { cstyles . marginbottomlarge }
161
+ style = { { textAlign : "center" } }
162
+ >
136
163
{ modalTitle }
137
164
</ div >
138
165
@@ -163,7 +190,11 @@ const PayURIModal = ({
163
190
</ button >
164
191
) }
165
192
166
- < button type = "button" className = { cstyles . primarybutton } onClick = { closeModal } >
193
+ < button
194
+ type = "button"
195
+ className = { cstyles . primarybutton }
196
+ onClick = { closeModal }
197
+ >
167
198
Close
168
199
</ button >
169
200
</ div >
@@ -176,7 +207,11 @@ type SidebarMenuItemProps = {
176
207
routeName : string ;
177
208
iconname : string ;
178
209
} ;
179
- const SidebarMenuItem = ( { name, routeName, iconname } : SidebarMenuItemProps ) => {
210
+ const SidebarMenuItem = ( {
211
+ name,
212
+ routeName,
213
+ iconname,
214
+ } : SidebarMenuItemProps ) => {
180
215
const activeColorClass = styles . sidebarmenuitemactive ;
181
216
182
217
return (
@@ -240,28 +275,37 @@ class Sidebar extends PureComponent<Props, State> {
240
275
openErrorModal (
241
276
"Zecwallet Fullnode" ,
242
277
< div className = { cstyles . verticalflex } >
243
- < div className = { cstyles . margintoplarge } > Zecwallet Fullnode v1.8.5</ div >
244
- < div className = { cstyles . margintoplarge } > Built with Electron. Copyright (c) 2018-2021, Aditya Kulkarni.</ div >
245
278
< div className = { cstyles . margintoplarge } >
246
- The MIT License (MIT) Copyright (c) 2018-2021 Zecwallet
279
+ Zecwallet Fullnode v1.8.5
280
+ </ div >
281
+ < div className = { cstyles . margintoplarge } >
282
+ Built with Electron. Copyright (c) 2018-2022, Aditya Kulkarni.
283
+ </ div >
284
+ < div className = { cstyles . margintoplarge } >
285
+ The MIT License (MIT) Copyright (c) 2018-2022 Zecwallet
247
286
< br />
248
287
< br />
249
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
250
- documentation files (the "Software"), to deal in the Software without restriction, including
251
- without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
252
- copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
253
- following conditions:
288
+ Permission is hereby granted, free of charge, to any person
289
+ obtaining a copy of this software and associated documentation files
290
+ (the "Software"), to deal in the Software without
291
+ restriction, including without limitation the rights to use, copy,
292
+ modify, merge, publish, distribute, sublicense, and/or sell copies
293
+ of the Software, and to permit persons to whom the Software is
294
+ furnished to do so, subject to the following conditions:
254
295
< br />
255
296
< br />
256
- The above copyright notice and this permission notice shall be included in all copies or substantial
257
- portions of the Software.
297
+ The above copyright notice and this permission notice shall be
298
+ included in all copies or substantial portions of the Software.
258
299
< br />
259
300
< br />
260
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
261
- NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
262
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
263
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
264
- USE OR OTHER DEALINGS IN THE SOFTWARE.
301
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
302
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
303
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
304
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
305
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
306
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
307
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
308
+ SOFTWARE.
265
309
</ div >
266
310
</ div >
267
311
) ;
@@ -305,11 +349,16 @@ class Sidebar extends PureComponent<Props, State> {
305
349
const rows = transactions . flatMap ( ( t ) => {
306
350
if ( t . detailedTxns ) {
307
351
return t . detailedTxns . map ( ( dt ) => {
308
- const normaldate = dateformat ( t . time * 1000 , "mmm dd yyyy hh::MM tt" ) ;
352
+ const normaldate = dateformat (
353
+ t . time * 1000 ,
354
+ "mmm dd yyyy hh::MM tt"
355
+ ) ;
309
356
310
357
// Add a single quote "'" into the memo field to force interpretation as a string, rather than as a
311
358
// formula from a rogue memo
312
- const escapedMemo = dt . memo ? `'${ dt . memo . replace ( / " / g, '""' ) } '` : "" ;
359
+ const escapedMemo = dt . memo
360
+ ? `'${ dt . memo . replace ( / " / g, '""' ) } '`
361
+ : "" ;
313
362
314
363
return `${ t . time } ,"${ normaldate } ","${ t . txid } ","${ t . type } ",${ dt . amount } ,"${ dt . address } ","${ escapedMemo } "` ;
315
364
} ) ;
@@ -321,7 +370,10 @@ class Sidebar extends PureComponent<Props, State> {
321
370
const header = [ `UnixTime, Date, Txid, Type, Amount, Address, Memo` ] ;
322
371
323
372
try {
324
- await window . zecwallet . writeFile ( save . filePath , header . concat ( rows ) . join ( "\n" ) ) ;
373
+ await window . zecwallet . writeFile (
374
+ save . filePath ,
375
+ header . concat ( rows ) . join ( "\n" )
376
+ ) ;
325
377
} catch ( err ) {
326
378
openErrorModal ( "Error Exporting Transactions" , `${ err } ` ) ;
327
379
}
@@ -403,12 +455,17 @@ class Sidebar extends PureComponent<Props, State> {
403
455
// eslint-disable-next-line no-control-regex
404
456
let keys = privKeyInputValue . split ( new RegExp ( "[\n\r]+" ) ) ;
405
457
if ( ! keys || keys . length === 0 ) {
406
- openErrorModal ( "No Keys Imported" , "No keys were specified, so none were imported" ) ;
458
+ openErrorModal (
459
+ "No Keys Imported" ,
460
+ "No keys were specified, so none were imported"
461
+ ) ;
407
462
return ;
408
463
}
409
464
410
465
// Filter out empty lines and clean up the private keys
411
- keys = keys . filter ( ( k ) => ! ( k . trim ( ) . startsWith ( "#" ) || k . trim ( ) . length === 0 ) ) ;
466
+ keys = keys . filter (
467
+ ( k ) => ! ( k . trim ( ) . startsWith ( "#" ) || k . trim ( ) . length === 0 )
468
+ ) ;
412
469
413
470
// Special case.
414
471
// Sometimes, when importing from a paperwallet or such, the key is split by newlines, and might have
@@ -514,22 +571,54 @@ class Sidebar extends PureComponent<Props, State> {
514
571
</ div >
515
572
516
573
< div className = { styles . sidebar } >
517
- < SidebarMenuItem name = "Dashboard" routeName = { routes . DASHBOARD } iconname = "fa-home" />
518
- < SidebarMenuItem name = "Send" routeName = { routes . SEND } iconname = "fa-paper-plane" />
519
- < SidebarMenuItem name = "Receive" routeName = { routes . RECEIVE } iconname = "fa-download" />
520
- < SidebarMenuItem name = "Transactions" routeName = { routes . TRANSACTIONS } iconname = "fa-list" />
521
- < SidebarMenuItem name = "Address Book" routeName = { routes . ADDRESSBOOK } iconname = "fa-address-book" />
574
+ < SidebarMenuItem
575
+ name = "Dashboard"
576
+ routeName = { routes . DASHBOARD }
577
+ iconname = "fa-home"
578
+ />
579
+ < SidebarMenuItem
580
+ name = "Send"
581
+ routeName = { routes . SEND }
582
+ iconname = "fa-paper-plane"
583
+ />
584
+ < SidebarMenuItem
585
+ name = "Receive"
586
+ routeName = { routes . RECEIVE }
587
+ iconname = "fa-download"
588
+ />
589
+ < SidebarMenuItem
590
+ name = "Transactions"
591
+ routeName = { routes . TRANSACTIONS }
592
+ iconname = "fa-list"
593
+ />
594
+ < SidebarMenuItem
595
+ name = "Address Book"
596
+ routeName = { routes . ADDRESSBOOK }
597
+ iconname = "fa-address-book"
598
+ />
522
599
</ div >
523
600
524
601
< div className = { cstyles . center } >
525
602
{ state === "CONNECTED" && (
526
- < div className = { [ cstyles . padsmallall , cstyles . margintopsmall , cstyles . blackbg ] . join ( " " ) } >
603
+ < div
604
+ className = { [
605
+ cstyles . padsmallall ,
606
+ cstyles . margintopsmall ,
607
+ cstyles . blackbg ,
608
+ ] . join ( " " ) }
609
+ >
527
610
< i className = { [ cstyles . green , "fas" , "fa-check" ] . join ( " " ) } />
528
611
Connected
529
612
</ div >
530
613
) }
531
614
{ state === "SYNCING" && (
532
- < div className = { [ cstyles . padsmallall , cstyles . margintopsmall , cstyles . blackbg ] . join ( " " ) } >
615
+ < div
616
+ className = { [
617
+ cstyles . padsmallall ,
618
+ cstyles . margintopsmall ,
619
+ cstyles . blackbg ,
620
+ ] . join ( " " ) }
621
+ >
533
622
< div >
534
623
< i className = { [ cstyles . yellow , "fas" , "fa-sync" ] . join ( " " ) } />
535
624
Syncing
@@ -538,8 +627,16 @@ class Sidebar extends PureComponent<Props, State> {
538
627
</ div >
539
628
) }
540
629
{ state === "DISCONNECTED" && (
541
- < div className = { [ cstyles . padsmallall , cstyles . margintopsmall , cstyles . blackbg ] . join ( " " ) } >
542
- < i className = { [ cstyles . red , "fas" , "fa-times-circle" ] . join ( " " ) } />
630
+ < div
631
+ className = { [
632
+ cstyles . padsmallall ,
633
+ cstyles . margintopsmall ,
634
+ cstyles . blackbg ,
635
+ ] . join ( " " ) }
636
+ >
637
+ < i
638
+ className = { [ cstyles . red , "fas" , "fa-times-circle" ] . join ( " " ) }
639
+ />
543
640
Connected
544
641
</ div >
545
642
) }
0 commit comments