mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 14:24:26 +01:00
web worker
check if already initialized more progress, zap feed not loading? request send receive fix setup profile editing and show zaps wallet connections kitchen sink mutiny plus and misc get rid of swap backup / restore, nostr stuff get rid of gifts channels stuff manage federations and profile fixes cleanup fix build fix chrome android update to cap 6 bump to actual 6.0.0 update xcode version fix interpolation again (regression) move all static methods to the worker add doc strings get rid of window.nostr, make parse params async fight load flicker use a "-test" bundle for debug builds so they don't clobber add back swaps and do some cleanup fix activity flicker
This commit is contained in:
committed by
Tony Giorgio
parent
f34b4b8e02
commit
e01b8465d5
@@ -1,4 +1,3 @@
|
||||
import { MutinyWallet } from "@mutinywallet/mutiny-wasm";
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { SecureStoragePlugin } from "capacitor-secure-storage-plugin";
|
||||
import { createSignal, Show } from "solid-js";
|
||||
@@ -7,7 +6,7 @@ import { Button, InfoBox, SimpleInput } from "~/components";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
|
||||
export function ImportNsecForm(props: { setup?: boolean }) {
|
||||
const [state, _actions] = useMegaStore();
|
||||
const [_state, _actions, sw] = useMegaStore();
|
||||
const navigate = useNavigate();
|
||||
const [nsec, setNsec] = createSignal("");
|
||||
const [saving, setSaving] = createSignal(false);
|
||||
@@ -18,16 +17,13 @@ export function ImportNsecForm(props: { setup?: boolean }) {
|
||||
setError(undefined);
|
||||
const trimmedNsec = nsec().trim();
|
||||
try {
|
||||
const npub = await MutinyWallet.nsec_to_npub(trimmedNsec);
|
||||
const npub = await sw.nsec_to_npub(trimmedNsec);
|
||||
if (!npub) {
|
||||
throw new Error("Invalid nsec");
|
||||
}
|
||||
await SecureStoragePlugin.set({ key: "nsec", value: trimmedNsec });
|
||||
|
||||
const new_npub = await state.mutiny_wallet?.change_nostr_keys(
|
||||
trimmedNsec,
|
||||
undefined
|
||||
);
|
||||
const new_npub = await sw.change_nostr_keys(trimmedNsec, undefined);
|
||||
console.log("Changed to new npub: ", new_npub);
|
||||
if (props.setup) {
|
||||
navigate("/addfederation");
|
||||
|
||||
Reference in New Issue
Block a user