diff --git a/README.md b/README.md index 4b8161ae..512567f3 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The EOS blockchain has their own native javascript library that can be used (e.g The wallet now also supports deeplinks, encrypted deeplinks, qr codes and local json files for generating blockchain request prompts for approval & broadcast with the BeetEOS wallet. These input methods do not require external packages, and can be stored for later use. -Supported blockchains: Bitshares, Bitshares testnet, TUSC, EOS, BEOS, TLOS. +Supported blockchains: Bitshares, Bitshares testnet, EOS, BEOS, TLOS. ## For end users @@ -56,7 +56,7 @@ BeetEOS is an [electron-based app](https://www.electronjs.org) for [cross-platfo To run BeetEOS it's simply a case of -``` bash +```bash # clone git clone https://github.com/beetapp/beeteos cd beeteos diff --git a/src/background.js b/src/background.js index c84873fd..a5e75e34 100644 --- a/src/background.js +++ b/src/background.js @@ -423,8 +423,9 @@ async function _parseDeeplink( } if (request.payload.method === Actions.INJECTED_CALL) { + console.log({req: request.payload.params}) let authorizedUse = false; - if (["BTS", "BTS_TEST", "TUSC"].includes(chain)) { + if (["BTS", "BTS_TEST"].includes(chain)) { let tr; try { tr = await blockchain._parseTransactionBuilder( @@ -443,16 +444,20 @@ async function _parseDeeplink( } } } else if (["EOS", "BEOS", "TLOS"].includes(chain)) { - if (request.payload.params.actions) { - for ( - let i = 0; - i < request.payload.params.actions.length; - i++ - ) { - let operation = request.payload.params.actions[i]; - if (settingsRows && settingsRows.includes(operation.name)) { - authorizedUse = true; - break; + if (request.payload.params && request.payload.params.length > 1) { + const actions = JSON.parse(request.payload.params[1]).actions; + + if (actions) { + for ( + let i = 0; + i < actions.length; + i++ + ) { + let operation = actions[i]; + if (settingsRows && settingsRows.includes(operation.name)) { + authorizedUse = true; + break; + } } } } @@ -680,6 +685,10 @@ const createWindow = async () => { responses["getAccessType"] = blockchain.getAccessType(); } + if (methods.includes("getSignUpInput")) { + responses["getSignUpInput"] = blockchain.getSignUpInput(); + } + if (methods.includes("getImportOptions")) { responses["getImportOptions"] = blockchain.getImportOptions(); } @@ -917,7 +926,7 @@ const createWindow = async () => { let parsedData = JSON.parse(qrData); let authorizedUse = false; - if (["BTS", "BTS_TEST", "TUSC"].includes(chain)) { + if (["BTS", "BTS_TEST"].includes(chain)) { const ops = parsedData.operations[0].operations; for (let i = 0; i < ops.length; i++) { let operation = ops[i]; @@ -946,7 +955,7 @@ const createWindow = async () => { if (authorizedUse) { let qrTX; try { - qrTX = ["BTS", "BTS_TEST", "TUSC"].includes(chain) + qrTX = ["BTS", "BTS_TEST"].includes(chain) ? await blockchain.handleQR( JSON.stringify(parsedData.operations[0]) ) @@ -964,7 +973,7 @@ const createWindow = async () => { origin: "localhost", appName: "qr", browser: qrChoice, - params: ["BTS", "BTS_TEST", "TUSC"].includes(chain) + params: ["BTS", "BTS_TEST"].includes(chain) ? qrTX.toObject() : qrTX, chain: chain, @@ -1121,7 +1130,6 @@ const createWindow = async () => { "explore.beos.world", "blocksights.info", "telos.eosx.io", - "wallet.tusc.network", ]; ipcMain.on("openURL", (event, arg) => { try { @@ -1406,9 +1414,11 @@ if (currentOS === "win32" || currentOS === "linux") { console.log(error); return; } - - let deeplinkingUrl = deeplink.includes("beeteos://api/") ? deeplink.split("beeteos://api/")[1] : deeplink.split("rawbeeteos://api/")[1]; - + + let deeplinkingUrl = deeplink.includes("beeteos://api/") + ? deeplink.split("beeteos://api/")[1] + : deeplink.split("rawbeeteos://api/")[1]; + let qs; try { qs = queryString.parse(deeplinkingUrl); @@ -1419,9 +1429,7 @@ if (currentOS === "win32" || currentOS === "linux") { if (qs) { mainWindow.webContents.send( - deeplink.includes("raw") - ? "rawdeeplink" - : "deeplink", + deeplink.includes("raw") ? "rawdeeplink" : "deeplink", qs ); } @@ -1478,7 +1486,7 @@ if (currentOS === "win32" || currentOS === "linux") { } if (qs) { - dialog.showErrorBox("Error", JSON.stringify({qs: qs})); + dialog.showErrorBox("Error", JSON.stringify({ qs: qs })); mainWindow.webContents.send(urlType, qs); } }); diff --git a/src/components/blockchains/ImportKeys.vue b/src/components/blockchains/ImportKeys.vue index 37c29353..f4fc8fec 100644 --- a/src/components/blockchains/ImportKeys.vue +++ b/src/components/blockchains/ImportKeys.vue @@ -48,7 +48,7 @@ let privateKey = ref(""); async function next() { let authorities = {}; - if (requiredFields.value.privateKey != null) { + if (requiredFields.value && requiredFields.value.privateKey) { authorities.privateKey = privateKey.value; } @@ -107,7 +107,7 @@ {{ t('common.keys_cta') }}
- +{{ t(accessType == 'account' ? 'common.active_authority' : 'common.public_authority') }}
@@ -131,7 +131,7 @@ {{ t('common.back_btn') }} - +