Skip to content

Commit ea7e877

Browse files
committed
fix eos local json and qr codes
1 parent 69610eb commit ea7e877

File tree

3 files changed

+350
-257
lines changed

3 files changed

+350
-257
lines changed

src/background.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ async function _parseDeeplink(
423423
}
424424

425425
if (request.payload.method === Actions.INJECTED_CALL) {
426-
console.log({req: request.payload.params})
427426
let authorizedUse = false;
428427
if (["BTS", "BTS_TEST"].includes(chain)) {
429428
let tr;
@@ -448,13 +447,12 @@ async function _parseDeeplink(
448447
const actions = JSON.parse(request.payload.params[1]).actions;
449448

450449
if (actions) {
451-
for (
452-
let i = 0;
453-
i < actions.length;
454-
i++
455-
) {
450+
for (let i = 0; i < actions.length; i++) {
456451
let operation = actions[i];
457-
if (settingsRows && settingsRows.includes(operation.name)) {
452+
if (
453+
settingsRows &&
454+
settingsRows.includes(operation.name)
455+
) {
458456
authorizedUse = true;
459457
break;
460458
}
@@ -939,7 +937,7 @@ const createWindow = async () => {
939937
}
940938
}
941939
} else if (["EOS", "BEOS", "TLOS"].includes(chain)) {
942-
const ops = parsedData.operations[0].actions;
940+
const ops = parsedData.actions;
943941
for (let i = 0; i < ops.length; i++) {
944942
let operation = ops[i];
945943
if (
@@ -959,7 +957,7 @@ const createWindow = async () => {
959957
? await blockchain.handleQR(
960958
JSON.stringify(parsedData.operations[0])
961959
)
962-
: parsedData.operations[0].actions;
960+
: parsedData;
963961
} catch (error) {
964962
console.log({ error, location: "background" });
965963
}
@@ -975,7 +973,7 @@ const createWindow = async () => {
975973
browser: qrChoice,
976974
params: ["BTS", "BTS_TEST"].includes(chain)
977975
? qrTX.toObject()
978-
: qrTX,
976+
: ["signAndBroadcast", qrTX, []],
979977
chain: chain,
980978
},
981979
};

0 commit comments

Comments
 (0)