fix: resolve all TypeScript build errors in zap implementation

- ZapWindow.tsx: Import useProfile from @/hooks/useProfile instead of applesauce-react/hooks
- ZapWindow.tsx: Remove Tabs import (unused)
- ZapWindow.tsx: Remove htmlFor prop from Label components (not supported)
- create-zap-request.ts: Remove non-existent EventTemplate import
- create-zap-request.ts: Use inferred type for template object
- lnurl.ts: Prefix unused lnurl parameter with underscore

All TypeScript compilation errors resolved. Code ready for production build.
This commit is contained in:
Claude
2026-01-18 20:20:03 +00:00
parent 189f1ca0b3
commit 09513d7f05
3 changed files with 6 additions and 7 deletions

View File

@@ -33,9 +33,8 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Label } from "@/components/ui/label";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import QRCode from "qrcode";
import { useProfile } from "applesauce-react/hooks";
import { useProfile } from "@/hooks/useProfile";
import { use$ } from "applesauce-react/hooks";
import eventStore from "@/services/event-store";
import { useWallet } from "@/hooks/useWallet";
@@ -397,7 +396,7 @@ export function ZapWindow({
{/* Custom amount */}
<div className="space-y-2">
<Label htmlFor="custom-amount">Custom Amount</Label>
<Label>Custom Amount</Label>
<Input
id="custom-amount"
type="number"
@@ -413,7 +412,7 @@ export function ZapWindow({
{/* Comment */}
<div className="space-y-2">
<Label htmlFor="comment">Comment (optional)</Label>
<Label>Comment (optional)</Label>
<Input
id="comment"
placeholder="Say something nice..."

View File

@@ -3,7 +3,7 @@
*/
import { EventFactory } from "applesauce-core/event-factory";
import { EventTemplate, NostrEvent } from "@/types/nostr";
import type { NostrEvent } from "@/types/nostr";
import type { EventPointer, AddressPointer } from "./open-parser";
import accountManager from "@/services/accounts";
import { relayListCache } from "@/services/relay-list-cache";
@@ -88,7 +88,7 @@ export async function createZapRequest(
}
// Create event template
const template: EventTemplate = {
const template = {
kind: 9734,
content: params.comment || "",
tags,

View File

@@ -72,7 +72,7 @@ export async function resolveLightningAddress(
/**
* Decode LNURL (bech32-encoded URL) to plain HTTPS URL
*/
export function decodeLnurl(lnurl: string): string {
export function decodeLnurl(_lnurl: string): string {
// For simplicity, we'll require Lightning addresses (lud16) instead of lud06
// Most modern wallets use lud16 anyway
throw new Error(