Skip to content

Commit

Permalink
chore(core): update default btc invoice expiration to 2 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 14, 2024
1 parent 69a86c8 commit a4bb0c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/api/src/domain/bitcoin/lightning/invoice-expiration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { toSeconds } from "@/domain/primitives"
const SECS_PER_MIN = toSeconds(60)
const SECS_PER_5_MINS = toSeconds(60 * 5)
const SECS_PER_HOUR = toSeconds(60 * 60)
const SECS_PER_2_HOURS = toSeconds(SECS_PER_HOUR * 2)
const SECS_PER_DAY = toSeconds(SECS_PER_HOUR * 24)

export const defaultTimeToExpiryInSeconds = SECS_PER_5_MINS

export const INVOICE_EXPIRATIONS = {
BTC: { min: SECS_PER_MIN, max: SECS_PER_DAY, defaultValue: SECS_PER_HOUR },
BTC: { min: SECS_PER_MIN, max: SECS_PER_DAY, defaultValue: SECS_PER_2_HOURS },
USD: { min: SECS_PER_MIN, max: SECS_PER_5_MINS, defaultValue: SECS_PER_5_MINS },
}

Expand Down

0 comments on commit a4bb0c8

Please sign in to comment.