enums in typescript are terrible

This commit is contained in:
Danny Morabito 2025-07-09 16:34:52 +02:00
parent 4b9a870063
commit 754cd2d198
Signed by: dannym
GPG key ID: 7CC8056A5A04557E
2 changed files with 12 additions and 12 deletions

View file

@ -1,16 +1,16 @@
import type { Proof } from "@cashu/cashu-ts";
export enum PaymentStatus {
ParsingDestination = 0,
AttemptingCashuPayment = 1,
AttemptingLightningPayment = 2,
CashuPaymentFailed = 3,
AmountRequired = 4,
PreparingOnchainPayment = 5,
BroadcastingOnchainPayment = 6,
PaymentFailed = 0xfe,
PaymentSent = 0xff,
}
export const PaymentStatus = {
ParsingDestination: 0,
AttemptingCashuPayment: 1,
AttemptingLightningPayment: 2,
CashuPaymentFailed: 3,
AmountRequired: 4,
PreparingOnchainPayment: 5,
BroadcastingOnchainPayment: 6,
PaymentFailed: 0xfe,
PaymentSent: 0xff,
} as const;
export interface CashuTxn {
txId: string;