diff options
author | Florian Dold <florian@dold.me> | 2022-09-14 20:34:37 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-14 20:40:38 +0200 |
commit | c021876b41bff11ad28c3a43808795fa0d02ce99 (patch) | |
tree | c92f4e83def462ddb0d446c9c476fd32f648d744 /packages/taler-wallet-core/src/db.ts | |
parent | 9d044058e267e9e94f3ee63809a1e22426151ee5 (diff) | |
download | wallet-core-c021876b41bff11ad28c3a43808795fa0d02ce99.tar.xz |
wallet-core: cache fresh coin count in DB
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index da566ff24..6dfa63c06 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -314,6 +314,11 @@ export interface DenominationRecord { * that includes this denomination. */ listIssueDate: TalerProtocolTimestamp; + + /** + * Number of fresh coins of this denomination that are available. + */ + freshCoinCount?: number; } /** @@ -520,6 +525,13 @@ export enum CoinStatus { * Withdrawn and never shown to anybody. */ Fresh = "fresh", + + /** + * Fresh, but currently marked as "suspended", thus won't be used + * for spending. Used for testing. + */ + FreshSuspended = "fresh-suspended", + /** * A coin that has been spent and refreshed. */ @@ -606,11 +618,6 @@ export interface CoinRecord { exchangeBaseUrl: string; /** - * The coin is currently suspended, and will not be used for payments. - */ - suspended: boolean; - - /** * Blinding key used when withdrawing the coin. * Potentionally used again during payback. */ |