Skip to content

Commit ce16ac0

Browse files
committed
Update build to Ubuntu 20.02
1 parent c5e2470 commit ce16ac0

File tree

2 files changed

+141
-44
lines changed

2 files changed

+141
-44
lines changed

.github/workflows/electron.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
os: [ubuntu-18.04, macos-latest, windows-latest]
14+
os: [ubuntu-20.04, macos-latest, windows-latest]
1515

1616
steps:
1717
- name: Context
@@ -21,10 +21,10 @@ jobs:
2121
- uses: actions/checkout@v1
2222
with:
2323
fetch-depth: 1
24-
- name: Use Node.js 14.x
24+
- name: Use Node.js 16.x
2525
uses: actions/setup-node@v1
2626
with:
27-
node-version: 14.x
27+
node-version: 16.x
2828
- name: yarn install
2929
run: |
3030
yarn install
@@ -42,7 +42,7 @@ jobs:
4242
if: contains(matrix.os, 'macos')
4343
uses: apple-actions/import-codesign-certs@v1
4444
with:
45-
p12-filepath: 'cert.p12'
45+
p12-filepath: "cert.p12"
4646
p12-password: ${{ secrets.p12certpassword }}
4747
- name: Build and Package@Mac
4848
if: contains(matrix.os, 'macos')

src/components/Sidebar.tsx

+137-40
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ type ExportPrivKeyModalProps = {
1616
exportedPrivKeys: string[] | null;
1717
closeModal: () => void;
1818
};
19-
const ExportPrivKeyModal = ({ modalIsOpen, exportedPrivKeys, closeModal }: ExportPrivKeyModalProps) => {
19+
const ExportPrivKeyModal = ({
20+
modalIsOpen,
21+
exportedPrivKeys,
22+
closeModal,
23+
}: ExportPrivKeyModalProps) => {
2024
return (
2125
<Modal
2226
isOpen={modalIsOpen}
@@ -25,21 +29,33 @@ const ExportPrivKeyModal = ({ modalIsOpen, exportedPrivKeys, closeModal }: Expor
2529
overlayClassName={cstyles.modalOverlay}
2630
>
2731
<div className={[cstyles.verticalflex].join(" ")}>
28-
<div className={cstyles.marginbottomlarge} style={{ textAlign: "center" }}>
32+
<div
33+
className={cstyles.marginbottomlarge}
34+
style={{ textAlign: "center" }}
35+
>
2936
Your Wallet Private Keys
3037
</div>
3138

3239
<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!
3442
</div>
3543

3644
{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+
/>
3850
)}
3951
</div>
4052

4153
<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+
>
4359
Close
4460
</button>
4561
</div>
@@ -69,12 +85,16 @@ const ImportPrivKeyModal = ({
6985
overlayClassName={cstyles.modalOverlay}
7086
>
7187
<div className={[cstyles.verticalflex].join(" ")}>
72-
<div className={cstyles.marginbottomlarge} style={{ textAlign: "center" }}>
88+
<div
89+
className={cstyles.marginbottomlarge}
90+
style={{ textAlign: "center" }}
91+
>
7392
Import Private Keys
7493
</div>
7594

7695
<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.
7898
</div>
7999

80100
<div className={cstyles.well} style={{ textAlign: "center" }}>
@@ -98,7 +118,11 @@ const ImportPrivKeyModal = ({
98118
>
99119
Import
100120
</button>
101-
<button type="button" className={cstyles.primarybutton} onClick={closeModal}>
121+
<button
122+
type="button"
123+
className={cstyles.primarybutton}
124+
onClick={closeModal}
125+
>
102126
Cancel
103127
</button>
104128
</div>
@@ -132,7 +156,10 @@ const PayURIModal = ({
132156
overlayClassName={cstyles.modalOverlay}
133157
>
134158
<div className={[cstyles.verticalflex].join(" ")}>
135-
<div className={cstyles.marginbottomlarge} style={{ textAlign: "center" }}>
159+
<div
160+
className={cstyles.marginbottomlarge}
161+
style={{ textAlign: "center" }}
162+
>
136163
{modalTitle}
137164
</div>
138165

@@ -163,7 +190,11 @@ const PayURIModal = ({
163190
</button>
164191
)}
165192

166-
<button type="button" className={cstyles.primarybutton} onClick={closeModal}>
193+
<button
194+
type="button"
195+
className={cstyles.primarybutton}
196+
onClick={closeModal}
197+
>
167198
Close
168199
</button>
169200
</div>
@@ -176,7 +207,11 @@ type SidebarMenuItemProps = {
176207
routeName: string;
177208
iconname: string;
178209
};
179-
const SidebarMenuItem = ({ name, routeName, iconname }: SidebarMenuItemProps) => {
210+
const SidebarMenuItem = ({
211+
name,
212+
routeName,
213+
iconname,
214+
}: SidebarMenuItemProps) => {
180215
const activeColorClass = styles.sidebarmenuitemactive;
181216

182217
return (
@@ -240,28 +275,37 @@ class Sidebar extends PureComponent<Props, State> {
240275
openErrorModal(
241276
"Zecwallet Fullnode",
242277
<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>
245278
<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
247286
<br />
248287
<br />
249-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
250-
documentation files (the &quot;Software&quot;), 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 &quot;Software&quot;), 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:
254295
<br />
255296
<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.
258299
<br />
259300
<br />
260-
THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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 &quot;AS IS&quot;, 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.
265309
</div>
266310
</div>
267311
);
@@ -305,11 +349,16 @@ class Sidebar extends PureComponent<Props, State> {
305349
const rows = transactions.flatMap((t) => {
306350
if (t.detailedTxns) {
307351
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+
);
309356

310357
// Add a single quote "'" into the memo field to force interpretation as a string, rather than as a
311358
// 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+
: "";
313362

314363
return `${t.time},"${normaldate}","${t.txid}","${t.type}",${dt.amount},"${dt.address}","${escapedMemo}"`;
315364
});
@@ -321,7 +370,10 @@ class Sidebar extends PureComponent<Props, State> {
321370
const header = [`UnixTime, Date, Txid, Type, Amount, Address, Memo`];
322371

323372
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+
);
325377
} catch (err) {
326378
openErrorModal("Error Exporting Transactions", `${err}`);
327379
}
@@ -403,12 +455,17 @@ class Sidebar extends PureComponent<Props, State> {
403455
// eslint-disable-next-line no-control-regex
404456
let keys = privKeyInputValue.split(new RegExp("[\n\r]+"));
405457
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+
);
407462
return;
408463
}
409464

410465
// 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+
);
412469

413470
// Special case.
414471
// 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> {
514571
</div>
515572

516573
<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+
/>
522599
</div>
523600

524601
<div className={cstyles.center}>
525602
{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+
>
527610
<i className={[cstyles.green, "fas", "fa-check"].join(" ")} />
528611
&nbsp; Connected
529612
</div>
530613
)}
531614
{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+
>
533622
<div>
534623
<i className={[cstyles.yellow, "fas", "fa-sync"].join(" ")} />
535624
&nbsp; Syncing
@@ -538,8 +627,16 @@ class Sidebar extends PureComponent<Props, State> {
538627
</div>
539628
)}
540629
{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+
/>
543640
&nbsp; Connected
544641
</div>
545642
)}

0 commit comments

Comments
 (0)