Skip to content

Commit

Permalink
fix eos local json and qr codes
Browse files Browse the repository at this point in the history
  • Loading branch information
grctest committed May 16, 2024
1 parent 69610eb commit ea7e877
Show file tree
Hide file tree
Showing 3 changed files with 350 additions and 257 deletions.
18 changes: 8 additions & 10 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ async function _parseDeeplink(
}

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

if (actions) {
for (
let i = 0;
i < actions.length;
i++
) {
for (let i = 0; i < actions.length; i++) {
let operation = actions[i];
if (settingsRows && settingsRows.includes(operation.name)) {
if (
settingsRows &&
settingsRows.includes(operation.name)
) {
authorizedUse = true;
break;
}
Expand Down Expand Up @@ -939,7 +937,7 @@ const createWindow = async () => {
}
}
} else if (["EOS", "BEOS", "TLOS"].includes(chain)) {
const ops = parsedData.operations[0].actions;
const ops = parsedData.actions;
for (let i = 0; i < ops.length; i++) {
let operation = ops[i];
if (
Expand All @@ -959,7 +957,7 @@ const createWindow = async () => {
? await blockchain.handleQR(
JSON.stringify(parsedData.operations[0])
)
: parsedData.operations[0].actions;
: parsedData;
} catch (error) {
console.log({ error, location: "background" });
}
Expand All @@ -975,7 +973,7 @@ const createWindow = async () => {
browser: qrChoice,
params: ["BTS", "BTS_TEST"].includes(chain)
? qrTX.toObject()
: qrTX,
: ["signAndBroadcast", qrTX, []],
chain: chain,
},
};
Expand Down
Loading

0 comments on commit ea7e877

Please sign in to comment.