From 1165a4495a67a14de3ac0d0e69c8b8b5a2246356 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 20 Dec 2023 15:02:00 +0530 Subject: [PATCH] feat: add list transactions --- frontend/src/screens/apps/New.tsx | 4 ---- frontend/src/types.ts | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/screens/apps/New.tsx b/frontend/src/screens/apps/New.tsx index d045eb12..8f25cabe 100644 --- a/frontend/src/screens/apps/New.tsx +++ b/frontend/src/screens/apps/New.tsx @@ -73,10 +73,6 @@ const New = () => { const handleSubmit = async (event: React.FormEvent) => { event.preventDefault(); if (!info) return; - // Here you'd handle form submission. For example: - console.log('Form Data', { - appName, pubkey, returnTo, maxAmount, budgetRenewal, expiresAt, requestMethods - }); const formData = new FormData(); formData.append("name", appName); formData.append("pubkey", pubkey); diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 6094982e..6482f1a0 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -3,10 +3,11 @@ export const NIP_47_GET_BALANCE_METHOD = "get_balance" export const NIP_47_GET_INFO_METHOD = "get_info" export const NIP_47_MAKE_INVOICE_METHOD = "make_invoice" export const NIP_47_LOOKUP_INVOICE_METHOD = "lookup_invoice" +export const NIP_47_LIST_TRANSACTIONS_METHOD = "list_transactions" export type BackendType = "ALBY" | "LND" -export type RequestMethodType = "pay_invoice" | "get_balance" | "get_info" | "make_invoice" | "lookup_invoice"; +export type RequestMethodType = "pay_invoice" | "get_balance" | "get_info" | "make_invoice" | "lookup_invoice" | "list_transactions" export type BudgetRenewalType = "daily" | "weekly" | "monthly" | "yearly" | ""; @@ -18,6 +19,7 @@ export const nip47MethodDescriptions: Record = { [NIP_47_PAY_INVOICE_METHOD]: "Send payments", [NIP_47_MAKE_INVOICE_METHOD]: "Create invoices", [NIP_47_LOOKUP_INVOICE_METHOD]: "Lookup status of invoices", + [NIP_47_LIST_TRANSACTIONS_METHOD]: "Read incoming transaction history", } export const nip47MethodIcons: Record = { @@ -26,6 +28,7 @@ export const nip47MethodIcons: Record = { [NIP_47_PAY_INVOICE_METHOD]: "lightning", [NIP_47_MAKE_INVOICE_METHOD]: "invoice", [NIP_47_LOOKUP_INVOICE_METHOD]: "search", + [NIP_47_LIST_TRANSACTIONS_METHOD]: "transactions", } export interface User {