chore: fix warnings
This commit is contained in:
@ -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: [
|
||||
|
Reference in New Issue
Block a user