diff --git a/.changeset/orange-owls-begin.md b/.changeset/orange-owls-begin.md new file mode 100644 index 0000000..d2c1f07 --- /dev/null +++ b/.changeset/orange-owls-begin.md @@ -0,0 +1,5 @@ +--- +'@fedimint/core-web': patch +--- + +Changed default "expiry" for ecash spends to 1 day diff --git a/packages/core-web/src/services/MintService.ts b/packages/core-web/src/services/MintService.ts index 06c28fd..13790d6 100644 --- a/packages/core-web/src/services/MintService.ts +++ b/packages/core-web/src/services/MintService.ts @@ -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 {