-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
939 lines (830 loc) · 48.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
<!DOCTYPE html>
<html lang='en'>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<link rel="shortcut icon" href="assets/favicon.png" type="image/x-icon">
<title>My DogeCash Wallet</title>
<meta name="description" content="An open-source, cryptographically-secure web wallet designed for the future of self-sovereign and adoption-friendly cryptocurrency.">
<meta name="keywords" content="web,wallet,webwallet,crypto,cryptocurrency,opensource,oss">
<meta property="og:image" content="assets/logo.svg">
<meta property="og:site" content="My DogeCash Wallet">
<link rel="icon" type="image/png" href="assets/logo.svg">
<meta name="msapplication-TileColor" content="#cc8e58">
<meta name="theme-color" content="#cc8e58">
<meta name="description" content="An open-source, cryptographically-secure web wallet designed for the future of self-sovereign and adoption-friendly cryptocurrency.">
<meta name="keywords" content="web,wallet,webwallet,crypto,cryptocurrency,opensource,oss">
<meta name="twitter:site" content="@JSKitteh">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="MyDOGECWallet">
<meta name="twitter:description" content="An open-source, cryptographically-secure web wallet designed for the future of self-sovereign and adoption-friendly cryptocurrency.">
<meta name="twitter:image" content="assets/logo.svg">
<meta property="og:title" content="MyDOGECWallet">
<meta property="og:description" content="An open-source, cryptographically-secure web wallet designed for the future of self-sovereign and adoption-friendly cryptocurrency.">
<meta property="og:site_name" content="MyDOGECWallet">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="assets/logo.svg">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/bootstrap-4.5.0/css/bootstrap.min.css">
<link href="assets/fontawesome/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/style/style.css">
<script type="text/javascript" src="assets/bootstrap-4.5.0/js/jquery.js"></script>
<script type="text/javascript" src="assets/bootstrap-4.5.0/js/bootstrap.js"></script>
<script type="text/javascript" src="scripts/libs/jdenticon.min.js"></script>
<!--- IMPORTANT: CHAIN PARAMS BELOW, DO NOT EDIT UNLESS YOU'RE ABSOLUTELY CERTAIN YOU KNOW WHAT YOU'RE DOING --->
<script>
// In most BTC-derived coins, the below parameters can be found in the 'src/chainparams.cpp' Mainnet configuration.
// These below params share the same names as the CPP params, so finding and editing these is easy-peasy!
/* chainparams */
const PUBKEY_PREFIX = "D";
const PUBKEY_ADDRESS = 30;
const SECRET_KEY = 122;
const COIN = 1e8;
// Cool stuff
const donationAddress = "DRt2KcbQqKGVXvR6F4i4xpExUSSarpNe7S";
</script>
</head>
<body>
<div id="page-container" class="home-hero">
<div id="content-wrap">
<!-- NAVBAR -->
<nav class="navbar navbar-expand-lg sticky-top navbar-dark navbarSpecial">
<div class="container">
<img id="navlogo" onclick="discoDoge()" class="navbar-brand noselect" src='assets/logo.svg' alt="DogeCash"
style='vertical-align: middle;width:150px;display:inline'>
<button id="navbarToggler" class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse noselect" id="navbarNav">
<!-- MAIN NAVBAR -->
<ul class="navbar-nav mr-auto" style="cursor: pointer;">
<li class="nav-item"><a id='start' class="nav-link tablinks" onclick="openTab(event, 'home')">Intro</a></li>
<li class="nav-item"><a class="nav-link tablinks" onclick="openTab(event, 'keypair')">Dashboard</a></li>
<li class="nav-item"><a id="txTab" class="nav-link tablinks" onclick="openTab(event, 'Transaction')">Create Transaction</a></li>
<li class="nav-item"><a class="nav-link tablinks" onclick="openTab(event, 'Settings');">Settings</a></li>
</ul>
<!-- SIDE NAVBAR -->
<div class="form-inline my-2 my-lg-0">
<ul class="navbar-nav mr-auto" style="cursor: pointer;">
<li class="nav-item"><a class="nav-link tablinks" href="javascript:;" id='Network' style='color:#b088ff'></a></li>
<li class="nav-item"><a class="nav-link tablinks" href="javascript:;" id='Debug' style='color:#b088ff'></a></li>
</ul>
</div>
</div>
</div>
</nav>
<!-- // NAVBAR -->
<!-- // WARNING MESSAGE -->
<div class="warning-message" id='outdated'>
<div class="container">
<p>WARNING: your version is outdated,
please update to the newest stable version at the <a href='https://github.com/dogecash/web-wallet/releases'>Web Wallet Github</a>
</p>
</div>
</div>
<!-- // WARNING MESSAGE -->
<!-- // QR MODAL -->
<div class="modal fade" id="qrModal" tabindex="-1" role="dialog" aria-labelledby="qrModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content" style="max-width: 90%">
<div class="modal-header">
<h5 class="modal-title" id="qrModalLabel">Address QR</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" style="text-align: center;">
<p id="ModalQRLabel" style="font-family: monospace; font-size: small; position: relative; top: 20px;"></p>
<div id="ModalQR" style="width: 100%; height: auto;"></div>
</div>
</div>
</div>
</div>
<br>
<!-- // QR MODAL -->
<div class="container">
<div class="row no-gutters">
<div class='col-md-12 rm-pd'>
<div id="home" class="tabcontent">
<!-- DogeCash TITLE SECTION -->
<div class="col-md-12 title-section float-left rm-pd">
<center>
<h3 class="dogec-bold-title"><span>Welcome to</span> My DogeCash Wallet!</h3>
</center>
</div>
<!-- // DogeCash TITLE SECTION -->
<!-- DogeCash FEATURE SECTION -->
<div class="col-md-12 features-section float-left rm-pd">
<!-- DogeCash FEATURE -->
<div class="col-md-6 float-left dogec-feature-father">
<div class="col-md-11 dogec-feature-interior">
<div class="col-md-12 feature-icon">
<img src="assets/3.svg">
</div>
<h4>Be your own Bank!</h4>
<h5>
MyDOGECWallet has <b>no custody</b> over your funds. You are in full ownership of your keys.
</h5>
<span style="cursor: pointer;" onclick="window.location.href='https://dogecash.org/'" class="brand-icon-link">
Know more<span class="link-icon link-icon-suffix"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</span>
</div>
</div>
<!-- // DogeCash FEATURE -->
<!-- DogeCash FEATURE -->
<div class="col-md-6 float-left dogec-feature-father">
<div class="col-md-11 dogec-feature-interior">
<div class="col-md-12 feature-icon">
<img src="assets/2.svg" style="max-width:130px">
</div>
<h4>Universal and Portable</h4>
<h5>
You can generate cryptographically-secure addresses with your browser and hardware.
</h5>
<span style="cursor: pointer;" onclick="window.location.href='https://dogecash.org/'" class="brand-icon-link">
Know more<span class="link-icon link-icon-suffix"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</span>
</div>
</div>
<!-- // DogeCash FEATURE -->
<!-- DogeCash FEATURE -->
<div class="col-md-6 float-left dogec-feature-father">
<div class="col-md-11 dogec-feature-interior">
<div class="col-md-12 feature-icon">
<img src="assets/1.svg">
</div>
<h4>Don't trust, verify!</h4>
<h5>
MyDOGECWallet is completely open-source, available on the DogeCash github.
</h5>
<span style="cursor: pointer;" onclick="window.location.href='https://dogecash.org/'" class="brand-icon-link">
Know more<span class="link-icon link-icon-suffix"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</span>
</div>
</div>
<!-- // DogeCash FEATURE -->
<!-- DogeCash FEATURE -->
<div class="col-md-6 float-left dogec-feature-father">
<div class="col-md-11 dogec-feature-interior">
<div class="col-md-12 feature-icon">
<img src="assets/4.svg">
</div>
<h4>For the community</h4>
<h5>
MyDOGECWallet is built with love without any fees, privacy intrusions or advertising.
</h5>
<span style="cursor: pointer;" onclick="window.location.href='https://dogecash.org/'" class="brand-icon-link">
Know more<span class="link-icon link-icon-suffix"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</span>
</div>
</div>
<!-- // DogeCash FEATURE -->
</div>
<!-- // DogeCash FEATURE SECTION -->
<!-- DogeCash DONATION SECTION -->
<div class="col-md-12 donation-section float-left rm-pd text-center">
<button class="dogec-button-big" onclick="openDonatePage()">
<span class="buttoni-text">Donate - Pay with MyDOGECWallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
<!-- // DogeCash DONATION SECTION -->
</div>
<!-- KEYPAIR SECTION -->
<div id="keypair" class="tabcontent">
<!-- DogeCash TITLE SECTION -->
<div class="col-md-12 title-section float-left rm-pd">
<center>
<h3 class="dogec-bold-title">Dashboard</h3>
</center>
</div>
<!-- // DogeCash TITLE SECTION -->
<!-- GENERATE WALLET -->
<div id='generateWallet' class="dashboard-item">
<div class="container">
<div class="coinstat-icon">
<img src="assets/wallet.svg" alt="Create new wallet">
</div>
<div class="col-md-12 dashboard-title">
<h3 class="dogec-bold-title" style="font-size:38px;"><span>Create a</span>New Wallet</h3>
<p>This will create a new, random DogeCash wallet that will contain no initial funds, you may transfer to-and-from this wallet with ease.</p>
</div>
<button class="dogec-button-big" onclick="generateWallet()">
<span class="buttoni-text">Create A New Wallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
</div>
<!-- // GENERATE WALLET -->
<br>
<!-- WALLET FUNCTIONALITIES -->
<!-- WARNING -->
<div id='genKeyWarning' style='display: none;' class="alert alert-danger col-md-12 float-left" role="alert">
<p><b>WARNING:</b> if you don't save your private key you
will lose access to your funds!<br>
Would you like to encrypt & save your wallet in your browser?<br>
</p>
<button class="dogec-button-big" onclick="encryptWallet()">
<span class="buttoni-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M85.967 10.65l-32.15-9.481a13.466 13.466 0 00-7.632 0l-32.15 9.48C11.661 11.351 10 13.567 10 16.042v26.623c0 12.321 3.67 24.186 10.609 34.31 6.774 9.885 16.204 17.49 27.264 21.99a5.612 5.612 0 004.251 0c11.061-4.5 20.491-12.104 27.266-21.99C86.329 66.85 90 54.985 90 42.664V16.042a5.656 5.656 0 00-4.033-5.392zM69 68.522C69 70.907 67.03 72 64.584 72H34.092C31.646 72 30 70.907 30 68.522v-23.49C30 42.647 31.646 41 34.092 41H37v-9.828C37 24.524 41.354 18.5 49.406 18.5 57.37 18.5 62 24.066 62 31.172V41h2.584C67.03 41 69 42.647 69 45.032v23.49zM58 41v-9.828c0-4.671-3.708-8.472-8.5-8.472-4.791 0-8.5 3.8-8.5 8.472V41h17z"></path></svg></span>
<span class="buttoni-text">Encrypt Wallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
<!-- // WARNING -->
<br>
<!-- WALLET FEATURES -->
<div id="guiWallet" style="display: none;">
<div id="banners" style="min-height: 160px; width: 100%; display: flex; flex-wrap: wrap; justify-content: space-evenly;">
<!-- WALLET FEATURE -->
<div class="large-box col-md-4">
<h3 class="noselect" style="margin: 10px; position: relative; left: 165px; cursor: default;">Address</h3>
<br>
<div>
<canvas id="identicon" class="innerShadow" width="65" height="65" data-jdenticon-value="" style="background-color: white; border-color: white; border-width: 3px; border-style: solid; border-radius: 1000px; position: relative; top: -30px; left: 15px;"></canvas>
<b id="guiAddress" style="line-break: anywhere; width: 60%; display: inline-block; right: -30px; position: relative; font-size: smaller; bottom: 50px; word-break: break-all; font-family: monospace; font-weight: 300;">~</b>
<b id="guiQRButton" style=" width: 60%; display: inline-block; right: -105px; position: relative; font-size: large; bottom: 40px;">
<i data-toggle="modal" data-target="#qrModal" style="cursor: pointer; margin-right: 15px;" class="fas fa-qrcode"></i>
<i onclick="toClipboard('guiAddress', 'guiAddressCopy')" id="guiAddressCopy" style="cursor: pointer; margin-right: 15px;" class="fas fa-clipboard" ></i>
</b>
</div>
</div>
<!-- // WALLET FEATURE -->
<!-- WALLET FEATURE -->
<div class="large-box col-md-4">
<h3 class="noselect" style="margin: 10px; position: relative; left: 135px; cursor: default;">Balance <span id="balanceReload" class="reload noselect" onclick="refreshChainData()">↻</span></h3>
<div>
<div style="display: inline-block; position: relative; width: 65px; height: 65px; left: 30px; bottom: 5px; border-style: solid; border-radius: 1000px; border-width: 3px; background-size: 65%;background-image: url(assets/favicon.png);background-repeat: no-repeat;background-position: center;"></div>
<p id="guiBalanceBox" style="display: inline-block; width: 50%; position: relative; right: -70px; bottom: 25px; font-size: x-large;"><b id="guiBalance">~</b> DOGEC</p>
</div>
</div>
</div>
<!-- // WALLET FEATURE -->
<div class="large-box col-md-4" style="height: 99%; text-align:center;margin-left: auto;margin-right: auto;">
<div id="PrivateQR" style="display: none; padding: 10px;"><img src="" width="82" height="82"></div>
<div id="PublicQR" style="display: block; padding: 10px;"><img src="" width="82" height="82"></div>
<textarea id="PrivateTxt" style="display: none; color: black; font-size: 9px !important; text-align: center; line-height: 20px;" disabled="" class="form-control private-key-area">
</textarea>
<button class="dogec-button-big" onclick="toggleKeyView()">
<span class="buttoni-icon"><i class="far fa-eye" style="margin-top:4px;"></i></span>
<span class="buttoni-text" id="guiViewKey">Pubkey QR</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
</div>
<!-- WALLET FEATURES -->
<!-- // WALLET FUNCTIONALITIES -->
<!-- GENERATE VANITY WALLET -->
<div id='generateVanityWallet' class="dashboard-item">
<div class="container">
<div class="coinstat-icon">
<img src="assets/vanity.svg" alt="Create new vanity address">
</div>
<div class="col-md-12 dashboard-title">
<h3 class="dogec-bold-title" style="font-size:38px;"><span>Create a new</span>Vanity Wallet</h3>
<span class="badge badge-warning">Experimental</span></h1>
<p>This will create a DogeCash wallet with a customized prefix of your choosing, requiring more processing power to generate such addresses, it is recommended to generate a prefix of less than 5 characters, for example: "DAD" is a possible address prefix.</p>
</div>
<input style="display:none;" type="text" id='prefix' placeholder="Address Prefix" onkeyup="checkVanity()">
<button class="dogec-button-big" onclick="generateVanityWallet()">
<span class="buttoni-text" id="vanButtonText">Create A Vanity Wallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
</div>
<!-- // GENERATE VANITY WALLET -->
<br>
<!-- ACCESS WALLET -->
<div id="accessWallet" class="dashboard-item" style="margin-bottom:100px;">
<div class="container">
<div class="coinstat-icon">
<img src="assets/my-wallet.svg" alt="Go to my wallet">
</div>
<div class="col-md-12 dashboard-title">
<h3 class="dogec-bold-title" style="font-size:38px;"><span>Go to</span>My Wallet</h3>
<p>This will import a DogeCash wallet that you hold via it's private key, loading the address and pulling your existing balance, if any, from an explorer node.
<br>
<span style="opacity: 0.75; font-size: small;">*Note: MPW developers can NOT access your wallet, this wallet runs purely in YOUR browser using JavaScript.</span>
</p>
</div>
<input style="display:none;" type="text" id='prefix' placeholder="Address Prefix">
<!-- IMPORT WALLET -->
<input style="width: 0px; height: 0px; opacity: 0;" type="text" id="clipboard">
<div id='importWallet' style='display: none;'>
<input type="text" id='privateKey' placeholder="Private Key">
<button class="dogec-button-big" onclick="importWallet()">
<span class="buttoni-icon"><i class="fas fa-file-upload" style="margin-top:4px;"></i></span>
<span class="buttoni-text">Import Wallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
<!-- // IMPORT WALLET -->
<button class="dogec-button-big" onclick="toggleWallet()">
<span class="buttoni-text" id='wToggle'>Access My Wallet</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
</div>
<!-- // ACESSS WALLET -->
<br>
<br>
</div>
<!-- // KEYPAIR SECTION -->
<div id="Transaction" class="tabcontent">
<!-- DogeCash TITLE SECTION -->
<div class="col-md-12 title-section float-left rm-pd">
<center>
<h3 class="dogec-bold-title"><span>Create a</span> Transaction</h3>
</center>
</div>
<br>
<!-- // DogeCash TITLE SECTION -->
<div id='errorNotice' class="col-md-12 float-left" style="margin-top:10px;"></div>
<div class="col-md-12" style="margin-top: 54px;">
<p style="color: white; opacity: 0.6; text-align: center;">Please <b>AVOID</b> sending to Shielded or Cold Staking addresses using this wallet - this functionality is currently unsupported.</p>
</div>
<div class='pullDown' style='clear:both;'>
<div id="simpleTransactionsDropdown" onclick='toggleDropDown("simpleTransactions")'>Create Simple Transactions<span
style='float:right;'>▼</span></div>
<div id='simpleTransactions' style='display: block'>
<br>
<label>Address</label><br>
<input style="min-width: 375px; max-width: 90%; font-family: monospace; text-align: center;" type="text" id="address1s">
<br>
<label>Amount</label><br>
<input style="text-align: center;" type="number" min="0" id="value1s">
<div id="reqDescDisplay" style="display: none;">
<label>Description (from the merchant)</label><br>
<input style="text-align: center;" type="text" disabled id="reqDesc">
</div>
<br>
<div id='HumanReadable'></div>
<br>
<button class="dogec-button-big" onclick="createSimpleTransation()">
<span class="buttoni-icon"><i class="fas fa-paper-plane" style="margin-top:4px;"></i></span>
<span class="buttoni-text" id="genIt">Send Transaction</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
<div id='transactionFinal'></div>
</div>
<br>
<div class='pullDown' style='clear:both;'>
<div onclick='toggleDropDown("advTransactions")'>Create Manual Transactions<span
style='float:right;'>▼</span></div>
<div id='advTransactions' style='display:none'>
<br>
<h2>Inputs</h2>
<label>Trx Hash</label><br>
<input type="text" id="prevTrxHash">
<label>Index</label><br>
<input type="text" id="index">
<label>Script</label><br>
<input type="text" id="script"><br><br>
<h2>Outputs</h2>
<label>Output Address 1</label><br>
<input type="text" id="address1">
<label>Amount</label><br>
<input type="text" id="value1">
<br />
<label>Output address 2</label><br>
<input type="text" id="address2">
<label>Amount</label><br>
<input type="text" id="value2"><br><br>
<h2>WIF Key</h2>
<label>key</label><br>
<input type="text" id="wif">
<br /><br />
<p><b>WARNING:</b> ANY FUNDS NOT ALLOCATED WILL BE USED AS FEES</p>
<button class="dogec-button-big" onclick="createRawTransaction()">
<span class="buttoni-icon"><i class="fas fa-paper-plane" style="margin-top:4px;"></i></span>
<span class="buttoni-text">Create Raw Signed Transction</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
<br /><br /><br />
<h4>Signed Raw Transaction</h4>
<textarea rows="15" cols="70" id="rawTrx"></textarea>
<p>Don't understand how this works? <a target='_blank'
href='https://github.com/dogecash/web-wallet#transaction'>Tutorial Here</a></p>
<p>Advanced Details: <br>locktime is set to 0, sequence is set to max. SIGHASH_ALL option is chosen
for signing raw Transaction.</p>
</div>
</div>
</div>
<div id="Settings" class="tabcontent">
<form action="javascript:setExplorer()">
<label for="explorer">Choose an explorer:</label><br>
<select id="explorer" class="form-control" name="explorer">
<option value="cryptoid">https://api2.dogecash.org</option>
<option value="custom">custom (In Development)</option>
</select>
<br>
<button class="dogec-button-big" type="submit" style="width:100%;">
<span class="buttoni-icon"><i class="fas fa-paper-plane" style="margin-top:4px;"></i></span>
<span class="buttoni-text">Submit</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</form>
<br>
<button class="dogec-button-big" onclick="toggleDebug()">
<span class="buttoni-icon"><i class="fas fa-bug" style="margin-top:4px;"></i></span>
<span class="buttoni-text">Toggle Debug Mode</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
<button class="dogec-button-big" onclick="toggleNetwork()">
<span class="buttoni-icon"><i class="fas fa-network-wired" style="margin-top:4px;"></i></span>
<span class="buttoni-text">Toggle Networking Mode</span>
<span class="buttoni-arrow"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23.328 16.707L13.121 26.914a.5.5 0 01-.707 0l-2.828-2.828a.5.5 0 010-.707L16.964 16 9.586 8.621a.5.5 0 010-.707l2.828-2.828a.5.5 0 01.707 0l10.207 10.207a1 1 0 010 1.414z"></path></svg></span>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div style='display:inline;' id='dcfooter'></div>
</div>
</div>
<script type="text/javascript" src="scripts/libs/aes-gcm.js"></script>
<script type="text/javascript" src="scripts/libs/crypto-min.js"></script>
<script type="text/javascript" src="scripts/libs/crypto-sha256.js"></script>
<script type="text/javascript" src="scripts/libs/crypto-sha256-hmac.js"></script>
<script type="text/javascript" src="scripts/libs/ripemd160.js"></script>
<script type="text/javascript" src="scripts/libs/jsbn.js"></script>
<script type="text/javascript" src="scripts/libs/ellipticcurve.js"></script>
<script type="text/javascript" src="scripts/libs/script.js"></script>
<script type="text/javascript" src="scripts/libs/qrcode.js"></script>
<script type="text/javascript" src="scripts/libs/sha256.js"></script>
<script type="text/javascript" src="scripts/settings.js"></script>
<script type="text/javascript" src="scripts/wallet.js"></script>
<script type="text/javascript" src="scripts/network.js"></script>
<script type="text/javascript" src="scripts/bitTrx.js"></script>
<script>
// WALLET STATE DATA
let cachedUTXOs = [];
let cachedBlockCount = 0;
// Cached DOM elements
const domStart = document.getElementById("start");
const domNavbarToggler = document.getElementById("navbarToggler");
const domGuiWallet = document.getElementById('guiWallet');
const domGuiBalance = document.getElementById("guiBalance");
const domGuiBalanceBox = document.getElementById("guiBalanceBox");
const domBalanceReload = document.getElementById("balanceReload");
const domTxTab = document.getElementById("txTab");
const domSimpleTXs = document.getElementById("simpleTransactions");
const domSimpleTXsDropdown = document.getElementById("simpleTransactionsDropdown");
const domAddress1s = document.getElementById("address1s");
const domValue1s = document.getElementById("value1s");
const domGuiViewKey = document.getElementById('guiViewKey');
const domPrivateTxt = document.getElementById('PrivateTxt');
const domPrivateQr = document.getElementById('PrivateQR');
const domPublicQr = document.getElementById('PublicQR');
const domModalQR = document.getElementById('ModalQR');
const domModalQrLabel = document.getElementById('ModalQRLabel');
const domPrefix = document.getElementById('prefix');
const domWalletToggle = document.getElementById("wToggle");
const domGenerateWallet = document.getElementById('generateWallet');
const domImportWallet = document.getElementById('importWallet');
const domGenVanityWallet = document.getElementById('generateVanityWallet');
const domAccessWallet = document.getElementById('accessWallet');
const domVanityUiButtonTxt = document.getElementById("vanButtonText");
const domGenKeyWarning = document.getElementById('genKeyWarning');
const domGuiAddress = document.getElementById('guiAddress');
const domGenIt = document.getElementById("genIt");
const domHumanReadable = document.getElementById("HumanReadable");
const domReqDesc = document.getElementById('reqDesc');
const domReqDisplay = document.getElementById('reqDescDisplay');
const domIdenticon = document.getElementById("identicon");
const domPrivKey = document.getElementById("privateKey");
function getBalance(updateGUI = false) {
let nBalance = cachedUTXOs.reduce((a, b) => { return a + b.value }, 0);
// Update the GUI too, if chosen
if (updateGUI) {
// Set the balance, and adjust font-size for large balance strings
domGuiBalance.innerText = nBalance / COIN;
domGuiBalanceBox.style.fontSize = (nBalance / COIN).toString().length > 6 ? "large" : "x-large";
}
return nBalance;
}
// URL-Query request processing
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
let requestTo;
let requestAmount;
// Check for a payment request
if (urlParams.has('pay') && urlParams.has('amount')) {
requestTo = urlParams.get('pay');
requestAmount = parseFloat(urlParams.get('amount'));
console.log(requestTo + " " + requestAmount);
// We have our payment request info, wait until the page is fully loaded then display the payment request via .onload
}
let audio = null;
function discoDoge() {
document.getElementById("navlogo").className += " discoFilter";
}
function toClipboard(element, caller) {
let nCopy = document.getElementById(element);
caller = document.getElementById(caller);
let nClipboard = document.getElementById('clipboard');
nClipboard.value = nCopy.value || nCopy.innerHTML;
nClipboard.select();
nClipboard.setSelectionRange(0, 99999);
document.execCommand("copy");
caller.className += " fa-check";
caller.className = caller.className.replace(/ fa-clipboard/g, '');
caller.style.cursor = "default";
setTimeout(() => {
caller.className += " fa-clipboard";
caller.className = caller.className.replace(/ fa-check/g, '');
caller.style.cursor = "pointer";
}, 1000);
}
function openDonatePage() {
domTxTab.click();
if (domSimpleTXs.style.display === 'none')
domSimpleTXsDropdown.click();
domAddress1s.value = donationAddress;
domValue1s.focus();
}
let viewPrivKey = false;
function toggleKeyView() {
viewPrivKey = !viewPrivKey;
domGuiViewKey.innerHTML = viewPrivKey ? 'Privkey QR' : 'Pubkey QR';
domPrivateTxt.style.display = viewPrivKey ? 'block' : 'none';
domPrivateQr.style.display = viewPrivKey ? 'block' : 'none';
domPublicQr.style.display = !viewPrivKey ? 'block' : 'none';
}
function hideAllWalletOptions() {
// Hide and Reset the Vanity address input
domPrefix.value = "";
domPrefix.style.display = 'none';
// Hide 'generate wallet'
domGenerateWallet.style.display = 'none';
// Hide 'import wallet'
domImportWallet.style.display = 'none';
// Hide 'vanity wallet'
domGenVanityWallet.style.display = 'none';
// Hide 'access wallet'
domAccessWallet.style.display = 'none';
}
function toggleWallet() {
var toggle = domWalletToggle.innerHTML;
// Hide and Reset the Vanity address input
domPrefix.value = "";
domPrefix.style.display = 'none';
if (toggle === "Access My Wallet") {
if (!hasEncryptedWallet()) {
// No local wallet found
domGenerateWallet.style.display = 'none';
domImportWallet.style.display = 'block';
domWalletToggle.innerHTML = "Create A New Wallet";
return;
}
// We have a local wallet! Display the decryption prompt
decryptWallet().then(hasWallet => {
if (hasWallet) {
hideAllWalletOptions();
} else {
domGenerateWallet.style.display = 'block';
domImportWallet.style.display = 'none';
domWalletToggle.innerHTML = "Access My Wallet";
}
}).catch(e => {
domGenerateWallet.style.display = 'none';
domImportWallet.style.display = 'block';
domWalletToggle.innerHTML = "Create A New Wallet";
});
} else {
domGenerateWallet.style.display = 'block';
domImportWallet.style.display = 'none';
domWalletToggle.innerHTML = "Access My Wallet";
}
}
function checkVanity() {
// Loosely check if the vanity address is valid
if (!domPrefix.value.length) return domPrefix.value = PUBKEY_PREFIX;
if (!domPrefix.value.startsWith(PUBKEY_PREFIX)) {
// Prefix doesnt match, splice it into the string
domPrefix.value = PUBKEY_PREFIX + domPrefix.value.substr(1);
}
}
let isVanityGenerating = false;
const arrWorkers = [];
let vanUiUpdater;
function stopSearch() {
isVanityGenerating = false;
for (let thread of arrWorkers) {
thread.terminate();
}
while (arrWorkers.length) arrWorkers.pop();
domPrefix.disabled = false;
domVanityUiButtonTxt.innerText = 'Create A Vanity Wallet';
clearInterval(vanUiUpdater);
}
async function generateVanityWallet() {
if (isVanityGenerating) return stopSearch();
if (typeof(Worker) === "undefined") return alert('This browser doesn\'t support Web Workers (multi-threaded JS), unfortunately you cannot generate Vanity wallets!');
// Generate a vanity address with the given prefix
if (domPrefix.value.length === 0 || domPrefix.style.display === 'none') {
// No prefix, display the intro!
domPrefix.placeholder = 'Custom Prefix (' + PUBKEY_PREFIX + ' ...)';
domPrefix.style.display = 'block';
domGenKeyWarning.style.display = 'none';
domPrivateTxt.innerHTML = "~";
domGuiAddress.innerHTML = "~";
} else {
// Ensure the input is base58 compatible
for (const char of domPrefix.value) {
if (!MAP.includes(char)) return alert("The character '" + char + "' is unsupported in addresses! (Not Base58 compatible)");
}
// We also don't want users to be mining addresses for years... so cap the letters to four until the generator is more optimized
if (domPrefix.value.length > 5) return alert("This is a long name! This would take a LONG time to find, please choose a shorter name!");
isVanityGenerating = true;
domPrefix.disabled = true;
// Cache a lowercase equivilent for lower-entropy comparisons (a case-insensitive search is ALOT faster!) and strip accidental spaces
const nInsensitivePrefix = domPrefix.value.toLowerCase().replace(/ /g, "");
const nPrefixLen = nInsensitivePrefix.length;
let attempts = 0;
// Setup workers
const nThreads = Math.max(Math.round(window.navigator.hardwareConcurrency / 2), 1);
console.log('Spawning ' + nThreads + ' vanity search threads!');
while (arrWorkers.length < nThreads) {
arrWorkers.push(new Worker("scripts/vanitygen_worker.js"));
arrWorkers[arrWorkers.length - 1].onmessage = (event) => checkResult(event.data);
}
// GUI Updater
let lastAttempts = 0;
domVanityUiButtonTxt.innerText = 'Stop (Searched ' + attempts.toLocaleString('en-GB') + ' keys)';
vanUiUpdater = setInterval(() => {
if (attempts > lastAttempts) {
lastAttempts = attempts;
domVanityUiButtonTxt.innerText = 'Stop (Searched ' + attempts.toLocaleString('en-GB') + ' keys)';
}
}, 200);
function checkResult(data) {
attempts++;
if (data.pub.substr(0, nPrefixLen).toLowerCase() == nInsensitivePrefix) {
importWallet(data.priv, true);
stopSearch();
domGuiBalance.innerHTML = "0";
domGuiBalanceBox.style.fontSize = "x-large";
return console.log("VANITY: Found an address after " + attempts + " attempts!");
}
}
}
}
function toggleDropDown(id) {
var openClosed = document.getElementById(id).style.display;
if (openClosed === 'block') {
document.getElementById(id).style.display = 'none';
} else {
document.getElementById(id).style.display = 'block';
}
}
function loadUnspendInputs() {
if (publicKeyForNetwork) {
getUnspentTransactions();
domSimpleTXs.style.display = 'block';
domGenIt.style.display = 'block';
} else {
alert("You need a wallet to transact with! Please import a wallet via the 'Dashboard --> Access my wallet' menu");
}
}
function createSimpleTransation() {
if (!networkEnabled) return alert("Cannot create Simple Transactions in offline mode; this requires an explorer to sync your balance (UTXOs), please enable Networking to use this feature! Otherwise, use 'Advanced Transactions'");
if (!publicKeyForNetwork) {
if (hasEncryptedWallet())
alert("Please unlock your wallet before sending transactions!");
else
alert("Please import/create your wallet before sending transactions!");
return;
}
let address = domAddress1s.value;
let value = Number(domValue1s.value);
if (domGenIt.innerHTML === 'Continue') {
domGenIt.innerHTML = 'Send Transaction';
domHumanReadable.innerHTML = "";
domValue1s.value = "";
domAddress1s.value = "";
domReqDesc.value = '';
domReqDisplay.style.display = 'none';
return;
}
let nBalance = getBalance() / COIN;
if (value > nBalance) return alert("Balance is too small! (" + nBalance + " - " + value + " = " + (nBalance - value).toFixed(8) + ")");
console.log("Constructing TX of value: " + value + " DOGEC");
// Loop our cached UTXOs and construct a TX
trx = bitjs.transaction();
let txValue = 0;
for (const UTXO of cachedUTXOs) {
if (txValue > value) {
// Required Coin Control value met, yahoo!
console.log("Coin Control: TX Constructed! Selected " + trx.inputs.length + " input(s) (" + txValue + " DOGEC)");
break;
}
trx.addinput(UTXO.id, UTXO.index, UTXO.script);
txValue += UTXO.value / COIN;
console.log("Coin Control: Selected input " + UTXO.id.substr(0, 6) + "(" + UTXO.index + ")... (Added " + (UTXO.value / COIN).toFixed(8) + " DOGEC - Total: " + txValue + ")");
}
if (address != '' && value != '') {
calculatefee(trx.serialize().length);
trx.addoutput(address, value); //Sending to this address
addresschange = publicKeyForNetwork;
totalSent = (parseFloat(fee) + parseFloat(value)).toFixed(8);
valuechange = (parseFloat(txValue) - parseFloat(totalSent)).toFixed(8);
if (totalSent <= nBalance) {
domHumanReadable.innerHTML = "Balance: " + nBalance.toFixed(8) + "<br>Fee: " + fee + "<br>To: " + address + "<br>Sent: " + value + "<br>Change Address: " + addresschange + "<br>Change: " + valuechange;
trx.addoutput(addresschange, valuechange); //Change Address
if (typeof privateKeyForTransactions !== 'undefined') {
sendTransaction(trx.sign(privateKeyForTransactions, 1));
domGenIt.innerHTML = "Continue";
} else {
console.log("No private key");
}
} else {
console.warn("Amount: " + value + "\nFee: " + fee + "\nChange: " + valuechange + "\nTOTAL: " + totalSent);
domHumanReadable.innerHTML = "You are trying to send more than you have!";
}
} else {
console.log("No address or value");
}
}
function createRawTransaction() {
//advanced transaction creation and signing
var trx = bitjs.transaction();
var txid = document.getElementById("prevTrxHash").value;
var index = document.getElementById("index").value;
var script = document.getElementById("script").value;
trx.addinput(txid, index, script);
var address = document.getElementById("address1").value;
var value = document.getElementById("value1").value;
trx.addoutput(address, value);
var address = document.getElementById("address2").value;
var value = document.getElementById("value2").value;
trx.addoutput(address, value);
var wif = document.getElementById("wif").value;
var textArea = document.getElementById("rawTrx");
textArea.value = trx.sign(wif, 1); //SIGHASH_ALL DEFAULT 1
}
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
if (!evt.currentTarget.className.includes("active"))
evt.currentTarget.className += " active";
// Close the navbar if it's not already closed
if (!domNavbarToggler.className.includes("collapsed"))
domNavbarToggler.click();
}
domStart.click();
function refreshChainData() {
// If in offline mode: don't sync ANY data or connect to the internet
if (!networkEnabled) return console.warn("Offline mode: For your security, the wallet will avoid ALL internet requests in offline mode.");
// Update identicon
domIdenticon.dataset.jdenticonValue = publicKeyForNetwork;
jdenticon();
// Play reload anim
domBalanceReload.className += " playAnim";
// Refresh UTXOs
getUnspentTransactions();
}
window.onload = (() => {
// Configure Identicon
jdenticon.configure({
saturation: {
color: 0.8
}
});
// Configure payment processor
if (requestTo && requestAmount) {
// Open 'Create Transaction' menu
domTxTab.click();
if (domSimpleTXs.style.display === 'none')
domSimpleTXsDropdown.click();
// Pre-fill inputs
domAddress1s.value = requestTo;
domValue1s.value = requestAmount;
// Payment request 'desc' is optional
if (urlParams.has('desc')) {
domReqDisplay.style.display = 'block';
domReqDesc.value = urlParams.get('desc');
} else {
domReqDesc.value = '';
domReqDisplay.style.display = 'none';
}
}
});
setInterval(refreshChainData, 15000);
</script>
</body>
</html>