chore: fix warnings
This commit is contained in:
parent
823bf431a5
commit
cf0b4b5b1a
@ -1,5 +1,5 @@
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { EventKind, NostrPrefix } from "@snort/nostr";
|
import { NostrPrefix } from "@snort/nostr";
|
||||||
|
|
||||||
import Mention from "Element/Mention";
|
import Mention from "Element/Mention";
|
||||||
import { parseNostrLink } from "Util";
|
import { parseNostrLink } from "Util";
|
||||||
|
@ -10,7 +10,6 @@ import ConnectNostrWallet from "Pages/settings/wallet/NWC";
|
|||||||
import ConnectCashu from "Pages/settings/wallet/Cashu";
|
import ConnectCashu from "Pages/settings/wallet/Cashu";
|
||||||
|
|
||||||
import NostrIcon from "Icons/Nostrich";
|
import NostrIcon from "Icons/Nostrich";
|
||||||
import CashuLogo from "cashu.png";
|
|
||||||
|
|
||||||
const WalletSettings = () => {
|
const WalletSettings = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -32,10 +31,6 @@ const WalletSettings = () => {
|
|||||||
<NostrIcon width={100} height={100} />
|
<NostrIcon width={100} height={100} />
|
||||||
<h3 className="f-end">Nostr Wallet Connect</h3>
|
<h3 className="f-end">Nostr Wallet Connect</h3>
|
||||||
</div>
|
</div>
|
||||||
{/*<div className="card" onClick={() => navigate("/settings/wallet/cashu")}>
|
|
||||||
<img src={CashuLogo} width={100} />
|
|
||||||
<h3 className="f-end">Cashu</h3>
|
|
||||||
</div>*/}
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
import {
|
import { LNWallet, Sats, WalletError, WalletErrorCode, WalletInfo, WalletInvoice } from "Wallet";
|
||||||
InvoiceRequest,
|
|
||||||
LNWallet,
|
|
||||||
prToWalletInvoice,
|
|
||||||
Sats,
|
|
||||||
WalletError,
|
|
||||||
WalletErrorCode,
|
|
||||||
WalletInfo,
|
|
||||||
WalletInvoice,
|
|
||||||
WalletInvoiceState,
|
|
||||||
} from "Wallet";
|
|
||||||
|
|
||||||
import { CashuMint, CashuWallet as TheCashuWallet, getEncodedToken, Proof } from "@cashu/cashu-ts";
|
import { CashuMint, CashuWallet as TheCashuWallet, Proof } from "@cashu/cashu-ts";
|
||||||
|
|
||||||
export class CashuWallet implements LNWallet {
|
export class CashuWallet implements LNWallet {
|
||||||
#mint: string;
|
#mint: string;
|
||||||
@ -28,14 +18,13 @@ export class CashuWallet implements LNWallet {
|
|||||||
if (!this.#wallet) {
|
if (!this.#wallet) {
|
||||||
throw new WalletError(WalletErrorCode.GeneralError, "Wallet not initialized");
|
throw new WalletError(WalletErrorCode.GeneralError, "Wallet not initialized");
|
||||||
}
|
}
|
||||||
const keysets = await this.#wallet.mint.getKeySets();
|
|
||||||
return {
|
return {
|
||||||
nodePubKey: "asdd",
|
nodePubKey: "asdd",
|
||||||
alias: "Cashu mint: " + this.#mint,
|
alias: "Cashu mint: " + this.#mint,
|
||||||
} as WalletInfo;
|
} as WalletInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
async login(_?: string | undefined): Promise<boolean> {
|
async login(): Promise<boolean> {
|
||||||
const m = new CashuMint(this.#mint);
|
const m = new CashuMint(this.#mint);
|
||||||
const keys = await m.getKeys();
|
const keys = await m.getKeys();
|
||||||
this.#wallet = new TheCashuWallet(keys, m);
|
this.#wallet = new TheCashuWallet(keys, m);
|
||||||
@ -47,13 +36,12 @@ export class CashuWallet implements LNWallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getBalance(): Promise<Sats> {
|
getBalance(): Promise<Sats> {
|
||||||
// return dummy balance of 1337 sats
|
|
||||||
return Promise.resolve(1337);
|
|
||||||
}
|
|
||||||
createInvoice(req: InvoiceRequest): Promise<WalletInvoice> {
|
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
payInvoice(pr: string): Promise<WalletInvoice> {
|
createInvoice(): Promise<WalletInvoice> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
payInvoice(): Promise<WalletInvoice> {
|
||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
getInvoices(): Promise<WalletInvoice[]> {
|
getInvoices(): Promise<WalletInvoice[]> {
|
||||||
@ -61,10 +49,6 @@ export class CashuWallet implements LNWallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NutBank {
|
|
||||||
proofs: Array<Proof>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NutStashBackup {
|
export interface NutStashBackup {
|
||||||
proofs: Array<Proof>;
|
proofs: Array<Proof>;
|
||||||
mints: [
|
mints: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user