chore: fixes
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
"name": "@snort/app",
|
||||
"version": "0.2.0",
|
||||
"dependencies": {
|
||||
"@cashu/cashu-ts": "^1.0.0-rc.3",
|
||||
"@here/maps-api-for-javascript": "^1.50.0",
|
||||
"@noble/curves": "^1.0.0",
|
||||
"@noble/hashes": "^1.3.3",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LNWallet } from "@snort/wallet";
|
||||
import React, { ReactNode } from "react";
|
||||
import { ReactNode } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import Copy from "@/Components/Copy/Copy";
|
||||
|
@ -5,10 +5,10 @@ import { useNavigate } from "react-router-dom";
|
||||
import LndLogo from "@/assets/img/lnd-logo.png";
|
||||
import AlbyIcon from "@/Components/Icons/Alby";
|
||||
import BlueWallet from "@/Components/Icons/BlueWallet";
|
||||
import CashuIcon from "@/Components/Icons/Cashu";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import NostrIcon from "@/Components/Icons/Nostrich";
|
||||
import { getAlbyOAuth } from "@/Pages/settings/wallet/utils";
|
||||
import CashuIcon from "@/Components/Icons/Cashu";
|
||||
|
||||
const WalletRow = (props: {
|
||||
logo: ReactNode;
|
||||
|
@ -2,7 +2,7 @@ import { RouteObject } from "react-router-dom";
|
||||
|
||||
import WalletSettings from "../WalletSettings";
|
||||
import AlbyOAuth from "./Alby";
|
||||
import ConnectCashu from "./Cashu";
|
||||
//import ConnectCashu from "./Cashu";
|
||||
import ConnectLNC from "./LNC";
|
||||
import ConnectLNDHub from "./LNDHub";
|
||||
import ConnectNostrWallet from "./NWC";
|
||||
@ -24,10 +24,10 @@ export const WalletSettingsRoutes = [
|
||||
path: "/settings/wallet/nwc",
|
||||
element: <ConnectNostrWallet />,
|
||||
},
|
||||
{
|
||||
/*{
|
||||
path: "/settings/wallet/cashu",
|
||||
element: <ConnectCashu />,
|
||||
},
|
||||
},*/
|
||||
{
|
||||
path: "/settings/wallet/alby",
|
||||
element: <AlbyOAuth />,
|
||||
|
@ -51,8 +51,10 @@ export class WalletStore extends ExternalStore<WalletStoreSnapshot> {
|
||||
if (w) {
|
||||
if ("then" in w) {
|
||||
w.then(async wx => {
|
||||
this.#instance.set(activeConfig.id, wx);
|
||||
this.notifyChange();
|
||||
if (wx) {
|
||||
this.#instance.set(activeConfig.id, wx);
|
||||
this.notifyChange();
|
||||
}
|
||||
});
|
||||
return undefined;
|
||||
} else {
|
||||
@ -116,8 +118,8 @@ export class WalletStore extends ExternalStore<WalletStoreSnapshot> {
|
||||
} as WalletStoreSnapshot;
|
||||
}
|
||||
|
||||
#activateWallet(cfg: WalletConfig): LNWallet | Promise<LNWallet> | undefined {
|
||||
const w = loadWallet(cfg.kind, cfg.data);
|
||||
async #activateWallet(cfg: WalletConfig) {
|
||||
const w = await loadWallet(cfg.kind, cfg.data);
|
||||
if (w) {
|
||||
w.on("change", d => this.#onWalletChange(cfg, d));
|
||||
}
|
||||
|
Reference in New Issue
Block a user