fix wallet opening in prod

Niko PLP 1 year ago
parent dcd76e3455
commit 058cdaf468
  1. BIN
      ng-app/dist-file.tar.gz
  2. 8
      ng-app/src/lib/Login.svelte
  3. 2
      ng-app/src/worker.js

Binary file not shown.

@ -14,6 +14,7 @@
import { onMount, createEventDispatcher, tick } from "svelte"; import { onMount, createEventDispatcher, tick } from "svelte";
import ng from "../api"; import ng from "../api";
import { emoji_cat, emojis, load_svg } from "../wallet_emojis"; import { emoji_cat, emojis, load_svg } from "../wallet_emojis";
import Worker from "../worker.js?worker";
export let wallet; export let wallet;
let tauri_platform = import.meta.env.TAURI_PLATFORM; let tauri_platform = import.meta.env.TAURI_PLATFORM;
@ -130,12 +131,13 @@
id: secret_wallet.V0.wallet_id, id: secret_wallet.V0.wallet_id,
}); });
} else { } else {
let worker_file = await import("../worker.js?worker"); //let worker_file = await import("../worker.js?worker");
const myWorker = new worker_file.default(); //const myWorker = new worker_file.default();
const myWorker = new Worker();
myWorker.postMessage({ wallet, pazzle, pin_code }); myWorker.postMessage({ wallet, pazzle, pin_code });
myWorker.onmessage = (msg) => { myWorker.onmessage = (msg) => {
//console.log("Message received from worker", msg.data); console.log("Message received from worker", msg.data);
if (msg.data.success) { if (msg.data.success) {
step = "end"; step = "end";
dispatch("opened", { dispatch("opened", {

@ -3,7 +3,7 @@ import {
} from "./api"; } from "./api";
onmessage = (e) => { onmessage = (e) => {
//console.log("Message received by worker", e.data); console.log("Message received by worker", e.data);
(async function() { (async function() {
try { try {
let secret_wallet = await ng.wallet_open_wallet_with_pazzle( let secret_wallet = await ng.wallet_open_wallet_with_pazzle(

Loading…
Cancel
Save