diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-19 12:42:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-19 12:42:47 -0300 |
commit | d483a3f5574355ed9c43eb6ddea59e5734323cf0 (patch) | |
tree | 2f4e3830512b50808b396991791c3c8877e5676e /packages/taler-wallet-core/src/util/denominations.ts | |
parent | 7330f0daf907133876baf8831c44ec34cec326e5 (diff) | |
download | wallet-core-d483a3f5574355ed9c43eb6ddea59e5734323cf0.tar.xz |
fix #7704
Diffstat (limited to 'packages/taler-wallet-core/src/util/denominations.ts')
-rw-r--r-- | packages/taler-wallet-core/src/util/denominations.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/util/denominations.ts b/packages/taler-wallet-core/src/util/denominations.ts index fb766e96a..5cc57bdab 100644 --- a/packages/taler-wallet-core/src/util/denominations.ts +++ b/packages/taler-wallet-core/src/util/denominations.ts @@ -29,7 +29,7 @@ import { WireFee, } from "@gnu-taler/taler-util"; import { DenominationRecord } from "../db.js"; -import { walletCoreDebugFlags } from "./debugFlags.js"; +import { WalletConfig } from "../index.js"; /** * Given a list of denominations with the same value and same period of time: @@ -452,13 +452,16 @@ export function createTimeline<Type extends object>( * Check if a denom is withdrawable based on the expiration time, * revocation and offered state. */ -export function isWithdrawableDenom(d: DenominationRecord): boolean { +export function isWithdrawableDenom( + d: DenominationRecord, + denomselAllowLate?: boolean, +): boolean { const now = AbsoluteTime.now(); const start = AbsoluteTime.fromTimestamp(d.stampStart); const withdrawExpire = AbsoluteTime.fromTimestamp(d.stampExpireWithdraw); const started = AbsoluteTime.cmp(now, start) >= 0; let lastPossibleWithdraw: AbsoluteTime; - if (walletCoreDebugFlags.denomselAllowLate) { + if (denomselAllowLate) { lastPossibleWithdraw = start; } else { lastPossibleWithdraw = AbsoluteTime.subtractDuraction( |