Skip to content

Commit 33054f1

Browse files
committed
error handling
1 parent 2eac3c4 commit 33054f1

8 files changed

+536
-358
lines changed

assets_js_bitrequest_config.js

Lines changed: 94 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,62 @@
1-
const glob_config = {
1+
const glob_multi_wallets = {
2+
"exodus": {
3+
"name": "exodus",
4+
"website": "https://www.exodus.io",
5+
"appstore": "https://apps.apple.com/app/id1414384820",
6+
"playstore": "https://play.google.com/store/apps/details?id=exodusmovement.exodus",
7+
"desktop": "https://www.exodus.io/desktop",
8+
"seed": true
9+
},
10+
"coinomi": {
11+
"name": "coinomi",
12+
"website": "https://www.coinomi.com",
13+
"appstore": "https://itunes.apple.com/app/id1333588809",
14+
"playstore": "https://play.google.com/store/apps/details?id=com.coinomi.wallet",
15+
"desktop": "https://www.coinomi.com/en/downloads/",
16+
"seed": true
17+
},
18+
"trezor": {
19+
"name": "trezor",
20+
"website": "https://trezor.io",
21+
"appstore": "https://trezor.io",
22+
"playstore": "https://trezor.io",
23+
"desktop": "https://trezor.io",
24+
"seed": true
25+
},
26+
"ledger": {
27+
"name": "ledger",
28+
"website": "https://www.ledger.com",
29+
"appstore": "https://itunes.apple.com/app/id1361671700",
30+
"playstore": "https://play.google.com/store/apps/details?id=com.ledger.live",
31+
"desktop": "https://www.ledger.com/ledger-live/download",
32+
"seed": true
33+
},
34+
"keepkey": {
35+
"name": "keepkey",
36+
"website": "https://shapeshift.com/keepkey",
37+
"appstore": "https://beta.shapeshift.com",
38+
"playstore": "https://beta.shapeshift.com",
39+
"desktop": "https://beta.shapeshift.com",
40+
"seed": true
41+
},
42+
"atomicwallet": {
43+
"name": "atomicwallet",
44+
"website": "https://atomicwallet.io",
45+
"appstore": "https://apps.apple.com/app/id1478257827",
46+
"playstore": "https://play.google.com/store/apps/details?id=io.atomicwallet",
47+
"desktop": "https://atomicwallet.io/#download-section-anchor",
48+
"seed": true
49+
},
50+
"cakewallet": {
51+
"name": "cakewallet",
52+
"website": "https://cakewallet.com",
53+
"appstore": "https://apps.apple.com/app/id1334702542",
54+
"playstore": "https://play.google.com/store/apps/details?id=com.cakewallet.cake_wallet",
55+
"desktop": "https://cakewallet.com",
56+
"seed": true
57+
}
58+
},
59+
glob_config = {
260
"bitrequest_coin_data": [{
361
"currency": "bitcoin",
462
"active": true,
@@ -14,11 +72,11 @@ const glob_config = {
1472
"wallets": {
1573
"wallet_download_page": "https://bitcoin.org/en/choose-your-wallet",
1674
"wallets": [
17-
glob_const.multi_wallets.cakewallet,
18-
glob_const.multi_wallets.exodus,
19-
glob_const.multi_wallets.coinomi,
20-
glob_const.multi_wallets.trezor,
21-
glob_const.multi_wallets.ledger,
75+
glob_multi_wallets.cakewallet,
76+
glob_multi_wallets.exodus,
77+
glob_multi_wallets.coinomi,
78+
glob_multi_wallets.trezor,
79+
glob_multi_wallets.ledger,
2280
{
2381
"name": "electrum",
2482
"website": "https://electrum.org",
@@ -249,12 +307,12 @@ const glob_config = {
249307
"wallets": {
250308
"wallet_download_page": "https://litecoin.org",
251309
"wallets": [
252-
glob_const.multi_wallets.cakewallet,
253-
glob_const.multi_wallets.exodus,
254-
glob_const.multi_wallets.coinomi,
255-
glob_const.multi_wallets.trezor,
256-
glob_const.multi_wallets.ledger,
257-
glob_const.multi_wallets.keepkey,
310+
glob_multi_wallets.cakewallet,
311+
glob_multi_wallets.exodus,
312+
glob_multi_wallets.coinomi,
313+
glob_multi_wallets.trezor,
314+
glob_multi_wallets.ledger,
315+
glob_multi_wallets.keepkey,
258316
{
259317
"name": "electrum",
260318
"website": "https://electrum-ltc.org",
@@ -383,11 +441,11 @@ const glob_config = {
383441
"wallets": {
384442
"wallet_download_page": "https://dogecoin.com/getting-started/",
385443
"wallets": [
386-
glob_const.multi_wallets.exodus,
387-
glob_const.multi_wallets.coinomi,
388-
glob_const.multi_wallets.trezor,
389-
glob_const.multi_wallets.ledger,
390-
glob_const.multi_wallets.keepkey
444+
glob_multi_wallets.exodus,
445+
glob_multi_wallets.coinomi,
446+
glob_multi_wallets.trezor,
447+
glob_multi_wallets.ledger,
448+
glob_multi_wallets.keepkey
391449
]
392450
},
393451
"settings": {
@@ -498,10 +556,10 @@ const glob_config = {
498556
"wallets": {
499557
"wallet_download_page": "https://www.dash.org/downloads/",
500558
"wallets": [
501-
glob_const.multi_wallets.exodus,
502-
glob_const.multi_wallets.coinomi,
503-
glob_const.multi_wallets.trezor,
504-
glob_const.multi_wallets.ledger,
559+
glob_multi_wallets.exodus,
560+
glob_multi_wallets.coinomi,
561+
glob_multi_wallets.trezor,
562+
glob_multi_wallets.ledger,
505563
{
506564
"name": "Dash-Wallet",
507565
"website": "https://www.dash.org",
@@ -625,12 +683,12 @@ const glob_config = {
625683
"wallets": {
626684
"wallet_download_page": "https://bch.info/en/wallets",
627685
"wallets": [
628-
glob_const.multi_wallets.cakewallet,
629-
glob_const.multi_wallets.exodus,
630-
glob_const.multi_wallets.coinomi,
631-
glob_const.multi_wallets.trezor,
632-
glob_const.multi_wallets.ledger,
633-
glob_const.multi_wallets.atomicwallet,
686+
glob_multi_wallets.cakewallet,
687+
glob_multi_wallets.exodus,
688+
glob_multi_wallets.coinomi,
689+
glob_multi_wallets.trezor,
690+
glob_multi_wallets.ledger,
691+
glob_multi_wallets.atomicwallet,
634692
{
635693
"name": "electron-cash",
636694
"website": "https://electroncash.org",
@@ -740,11 +798,11 @@ const glob_config = {
740798
"wallets": {
741799
"wallet_download_page": "https://ethereum.org/en/wallets/",
742800
"wallets": [
743-
glob_const.multi_wallets.cakewallet,
744-
glob_const.multi_wallets.exodus,
745-
glob_const.multi_wallets.trezor,
746-
glob_const.multi_wallets.ledger,
747-
glob_const.multi_wallets.keepkey,
801+
glob_multi_wallets.cakewallet,
802+
glob_multi_wallets.exodus,
803+
glob_multi_wallets.trezor,
804+
glob_multi_wallets.ledger,
805+
glob_multi_wallets.keepkey,
748806
{
749807
"name": "myetherwallet",
750808
"website": "https://www.mewwallet.com",
@@ -986,7 +1044,7 @@ const glob_config = {
9861044
"wallets": {
9871045
"wallet_download_page": "https://nanowallets.guide",
9881046
"wallets": [
989-
glob_const.multi_wallets.cakewallet,
1047+
glob_multi_wallets.cakewallet,
9901048
{
9911049
"name": "nautilus",
9921050
"website": "https://nautilus.io",
@@ -1150,8 +1208,8 @@ const glob_config = {
11501208
"wallets": {
11511209
"wallet_download_page": "https://www.getmonero.org/downloads/",
11521210
"wallets": [
1153-
glob_const.multi_wallets.coinomi,
1154-
glob_const.multi_wallets.cakewallet,
1211+
glob_multi_wallets.coinomi,
1212+
glob_multi_wallets.cakewallet,
11551213
{
11561214
"name": "monerujo",
11571215
"website": "https://www.monerujo.io",
@@ -1351,7 +1409,7 @@ const glob_config = {
13511409
"wallets": {
13521410
"wallet_download_page": "https://www.nimiq.com",
13531411
"wallets": [
1354-
glob_const.multi_wallets.atomicwallet,
1412+
glob_multi_wallets.atomicwallet,
13551413
{
13561414
"name": "wallet.nimiq.com",
13571415
"website": "https://wallet.nimiq.com",

assets_js_bitrequest_core.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ function checkphp() {
8484
br_set_local("symbols", symbols, true);
8585
} else {
8686
const this_error = data.error || "Unable to get API data";
87-
fail_dialogs("fixer", this_error);
87+
fail_dialogs("fixer", {
88+
"error": this_error
89+
});
8890
}
8991
}
9092
glob_let.io.phpsupport = "yes";
@@ -132,7 +134,9 @@ function setsymbols() {
132134
return
133135
}
134136
const this_error = data.error || "Unable to get API data";
135-
fail_dialogs("fixer", this_error);
137+
fail_dialogs("fixer", {
138+
"error": this_error
139+
});
136140
}
137141
}).fail(function(xhr, stat, err) {
138142
if (get_next_proxy()) {
@@ -4220,7 +4224,7 @@ function appendrequest(rd) {
42204224
txhistory,
42214225
paymenttimestamp
42224226
} = rd,
4223-
uoa_upper = uoa.toUpperCase(),
4227+
uoa_upper = uoa.toUpperCase(),
42244228
deter = iscrypto === true ? 6 : 2,
42254229
insufficient = status === "insufficient",
42264230
lnhash = txhash && txhash.slice(0, 9) === "lightning",
@@ -4350,7 +4354,7 @@ function appendrequest(rd) {
43504354
<div class='expired_panel'><h2>" + translate("expired") + "</h2></div>\
43514355
</li>");
43524356
rd.coindata = null, // no need to save coindata
4353-
new_requestli.data(rd).prependTo(requestlist);
4357+
new_requestli.data(rd).prependTo(requestlist);
43544358
if (render_archive) {
43554359
const transactionlist = requestlist.find("#" + requestid).find(".transactionlist");
43564360
add_historical_data(transactionlist, txhistory);

0 commit comments

Comments
 (0)