chore: fix warnings

This commit is contained in:
Kieran 2023-05-17 13:23:38 +01:00
parent 823bf431a5
commit cf0b4b5b1a
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
3 changed files with 8 additions and 29 deletions

View File

@ -1,5 +1,5 @@
import { Link } from "react-router-dom";
import { EventKind, NostrPrefix } from "@snort/nostr";
import { NostrPrefix } from "@snort/nostr";
import Mention from "Element/Mention";
import { parseNostrLink } from "Util";

View File

@ -10,7 +10,6 @@ import ConnectNostrWallet from "Pages/settings/wallet/NWC";
import ConnectCashu from "Pages/settings/wallet/Cashu";
import NostrIcon from "Icons/Nostrich";
import CashuLogo from "cashu.png";
const WalletSettings = () => {
const navigate = useNavigate();
@ -32,10 +31,6 @@ const WalletSettings = () => {
<NostrIcon width={100} height={100} />
<h3 className="f-end">Nostr Wallet Connect</h3>
</div>
{/*<div className="card" onClick={() => navigate("/settings/wallet/cashu")}>
<img src={CashuLogo} width={100} />
<h3 className="f-end">Cashu</h3>
</div>*/}
</div>
</>
);

View File

@ -1,16 +1,6 @@
import {
InvoiceRequest,
LNWallet,
prToWalletInvoice,
Sats,
WalletError,
WalletErrorCode,
WalletInfo,
WalletInvoice,
WalletInvoiceState,
} from "Wallet";
import { LNWallet, Sats, WalletError, WalletErrorCode, WalletInfo, WalletInvoice } 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 {
#mint: string;
@ -28,14 +18,13 @@ export class CashuWallet implements LNWallet {
if (!this.#wallet) {
throw new WalletError(WalletErrorCode.GeneralError, "Wallet not initialized");
}
const keysets = await this.#wallet.mint.getKeySets();
return {
nodePubKey: "asdd",
alias: "Cashu mint: " + this.#mint,
} as WalletInfo;
}
async login(_?: string | undefined): Promise<boolean> {
async login(): Promise<boolean> {
const m = new CashuMint(this.#mint);
const keys = await m.getKeys();
this.#wallet = new TheCashuWallet(keys, m);
@ -47,13 +36,12 @@ export class CashuWallet implements LNWallet {
}
getBalance(): Promise<Sats> {
// return dummy balance of 1337 sats
return Promise.resolve(1337);
}
createInvoice(req: InvoiceRequest): Promise<WalletInvoice> {
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.");
}
getInvoices(): Promise<WalletInvoice[]> {
@ -61,10 +49,6 @@ export class CashuWallet implements LNWallet {
}
}
interface NutBank {
proofs: Array<Proof>;
}
export interface NutStashBackup {
proofs: Array<Proof>;
mints: [