Skip to content

Commit

Permalink
feat: add list transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Dec 20, 2023
1 parent 60d9d66 commit 1165a44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions frontend/src/screens/apps/New.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ const New = () => {
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
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);
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" | "";

Expand All @@ -18,6 +19,7 @@ export const nip47MethodDescriptions: Record<RequestMethodType, string> = {
[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<RequestMethodType, string> = {
Expand All @@ -26,6 +28,7 @@ export const nip47MethodIcons: Record<RequestMethodType, string> = {
[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 {
Expand Down

0 comments on commit 1165a44

Please sign in to comment.