Skip to content

Commit 3b5a937

Browse files
committed
fix: type x402 verify/settle result variables (TS build errors)
1 parent 81d6cff commit 3b5a937

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/api/x402/settle/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export async function POST(request: NextRequest) {
243243
}
244244

245245
// Route to the appropriate settler
246-
let result;
246+
let result: { txHash: string; pending?: boolean; confirmations?: number; instant?: boolean };
247247
try {
248248
if (scheme === 'bolt12' || network === 'lightning') {
249249
result = await settleLightningPayment(payment);

src/app/api/x402/verify/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export async function POST(request: NextRequest) {
203203
const methodKey = payment.payload.methodKey || payment.payload.extra?.methodKey;
204204

205205
// Route to the appropriate verifier based on network/scheme
206-
let result;
206+
let result: { valid: boolean; error?: string; pendingConfirmation?: boolean };
207207

208208
if (scheme === 'bolt12' || network === 'lightning') {
209209
result = await verifyLightningPayment(payment);

0 commit comments

Comments
 (0)