Skip to content

Commit

Permalink
fix: update default ecash expiry to 1 day (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 authored Oct 21, 2024
1 parent e50ec77 commit d1ad74c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-owls-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fedimint/core-web': patch
---

Changed default "expiry" for ecash spends to 1 day
7 changes: 3 additions & 4 deletions packages/core-web/src/services/MintService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ export class MintService {
async spendNotes(
minAmount: MSats,
// Tells the wallet to automatically try to cancel the spend if it hasn't completed
// after the specified number of milliseconds.
// If the receiver has already redeemed the notes at this time,
// the notes will not be cancelled
tryCancelAfter: number | Duration = 0, // in seconds or Duration object
// after the specified number of seconds. If the receiver has already redeemed
// the notes at this time, the notes will not be cancelled.
tryCancelAfter: number | Duration = 3600 * 24, // defaults to 1 day
includeInvite: boolean = false,
extraMeta: JSONValue = {},
): Promise<MintSpendNotesResponse> {
Expand Down

0 comments on commit d1ad74c

Please sign in to comment.