@@ -423,8 +423,9 @@ async function _parseDeeplink(
423
423
}
424
424
425
425
if ( request . payload . method === Actions . INJECTED_CALL ) {
426
+ console . log ( { req : request . payload . params } )
426
427
let authorizedUse = false ;
427
- if ( [ "BTS" , "BTS_TEST" , "TUSC" ] . includes ( chain ) ) {
428
+ if ( [ "BTS" , "BTS_TEST" ] . includes ( chain ) ) {
428
429
let tr ;
429
430
try {
430
431
tr = await blockchain . _parseTransactionBuilder (
@@ -443,16 +444,20 @@ async function _parseDeeplink(
443
444
}
444
445
}
445
446
} else if ( [ "EOS" , "BEOS" , "TLOS" ] . includes ( chain ) ) {
446
- if ( request . payload . params . actions ) {
447
- for (
448
- let i = 0 ;
449
- i < request . payload . params . actions . length ;
450
- i ++
451
- ) {
452
- let operation = request . payload . params . actions [ i ] ;
453
- if ( settingsRows && settingsRows . includes ( operation . name ) ) {
454
- authorizedUse = true ;
455
- break ;
447
+ if ( request . payload . params && request . payload . params . length > 1 ) {
448
+ const actions = JSON . parse ( request . payload . params [ 1 ] ) . actions ;
449
+
450
+ if ( actions ) {
451
+ for (
452
+ let i = 0 ;
453
+ i < actions . length ;
454
+ i ++
455
+ ) {
456
+ let operation = actions [ i ] ;
457
+ if ( settingsRows && settingsRows . includes ( operation . name ) ) {
458
+ authorizedUse = true ;
459
+ break ;
460
+ }
456
461
}
457
462
}
458
463
}
@@ -680,6 +685,10 @@ const createWindow = async () => {
680
685
responses [ "getAccessType" ] = blockchain . getAccessType ( ) ;
681
686
}
682
687
688
+ if ( methods . includes ( "getSignUpInput" ) ) {
689
+ responses [ "getSignUpInput" ] = blockchain . getSignUpInput ( ) ;
690
+ }
691
+
683
692
if ( methods . includes ( "getImportOptions" ) ) {
684
693
responses [ "getImportOptions" ] = blockchain . getImportOptions ( ) ;
685
694
}
@@ -917,7 +926,7 @@ const createWindow = async () => {
917
926
918
927
let parsedData = JSON . parse ( qrData ) ;
919
928
let authorizedUse = false ;
920
- if ( [ "BTS" , "BTS_TEST" , "TUSC" ] . includes ( chain ) ) {
929
+ if ( [ "BTS" , "BTS_TEST" ] . includes ( chain ) ) {
921
930
const ops = parsedData . operations [ 0 ] . operations ;
922
931
for ( let i = 0 ; i < ops . length ; i ++ ) {
923
932
let operation = ops [ i ] ;
@@ -946,7 +955,7 @@ const createWindow = async () => {
946
955
if ( authorizedUse ) {
947
956
let qrTX ;
948
957
try {
949
- qrTX = [ "BTS" , "BTS_TEST" , "TUSC" ] . includes ( chain )
958
+ qrTX = [ "BTS" , "BTS_TEST" ] . includes ( chain )
950
959
? await blockchain . handleQR (
951
960
JSON . stringify ( parsedData . operations [ 0 ] )
952
961
)
@@ -964,7 +973,7 @@ const createWindow = async () => {
964
973
origin : "localhost" ,
965
974
appName : "qr" ,
966
975
browser : qrChoice ,
967
- params : [ "BTS" , "BTS_TEST" , "TUSC" ] . includes ( chain )
976
+ params : [ "BTS" , "BTS_TEST" ] . includes ( chain )
968
977
? qrTX . toObject ( )
969
978
: qrTX ,
970
979
chain : chain ,
@@ -1121,7 +1130,6 @@ const createWindow = async () => {
1121
1130
"explore.beos.world" ,
1122
1131
"blocksights.info" ,
1123
1132
"telos.eosx.io" ,
1124
- "wallet.tusc.network" ,
1125
1133
] ;
1126
1134
ipcMain . on ( "openURL" , ( event , arg ) => {
1127
1135
try {
@@ -1406,9 +1414,11 @@ if (currentOS === "win32" || currentOS === "linux") {
1406
1414
console . log ( error ) ;
1407
1415
return ;
1408
1416
}
1409
-
1410
- let deeplinkingUrl = deeplink . includes ( "beeteos://api/" ) ? deeplink . split ( "beeteos://api/" ) [ 1 ] : deeplink . split ( "rawbeeteos://api/" ) [ 1 ] ;
1411
-
1417
+
1418
+ let deeplinkingUrl = deeplink . includes ( "beeteos://api/" )
1419
+ ? deeplink . split ( "beeteos://api/" ) [ 1 ]
1420
+ : deeplink . split ( "rawbeeteos://api/" ) [ 1 ] ;
1421
+
1412
1422
let qs ;
1413
1423
try {
1414
1424
qs = queryString . parse ( deeplinkingUrl ) ;
@@ -1419,9 +1429,7 @@ if (currentOS === "win32" || currentOS === "linux") {
1419
1429
1420
1430
if ( qs ) {
1421
1431
mainWindow . webContents . send (
1422
- deeplink . includes ( "raw" )
1423
- ? "rawdeeplink"
1424
- : "deeplink" ,
1432
+ deeplink . includes ( "raw" ) ? "rawdeeplink" : "deeplink" ,
1425
1433
qs
1426
1434
) ;
1427
1435
}
@@ -1478,7 +1486,7 @@ if (currentOS === "win32" || currentOS === "linux") {
1478
1486
}
1479
1487
1480
1488
if ( qs ) {
1481
- dialog . showErrorBox ( "Error" , JSON . stringify ( { qs : qs } ) ) ;
1489
+ dialog . showErrorBox ( "Error" , JSON . stringify ( { qs : qs } ) ) ;
1482
1490
mainWindow . webContents . send ( urlType , qs ) ;
1483
1491
}
1484
1492
} ) ;
0 commit comments