diff options
author | Florian Dold <florian@dold.me> | 2021-06-10 16:32:37 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-10 16:32:37 +0200 |
commit | 8ad36d89f55783c34043ee9ef37759cd94bcec7c (patch) | |
tree | 1e638b45e59ef50985f799b57590032a57ac7049 /packages/taler-wallet-core/src/db.ts | |
parent | 7b7e3b4565169835ad04062d5c76ba655abd770a (diff) | |
download | wallet-core-8ad36d89f55783c34043ee9ef37759cd94bcec7c.tar.xz |
simplify pending transactions, make more tests pass again
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 52 |
1 files changed, 12 insertions, 40 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index d02ea192f..ca613e5e5 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -515,25 +515,11 @@ export interface DenominationRecord { exchangeBaseUrl: string; } -export enum ExchangeUpdateStatus { - FetchKeys = "fetch-keys", - FetchWire = "fetch-wire", - FetchTerms = "fetch-terms", - FinalizeUpdate = "finalize-update", - Finished = "finished", -} - export interface ExchangeBankAccount { payto_uri: string; master_sig: string; } -export enum ExchangeUpdateReason { - Initial = "initial", - Forced = "forced", - Scheduled = "scheduled", -} - export interface ExchangeDetailsRecord { /** * Master public key of the exchange. @@ -582,16 +568,6 @@ export interface ExchangeDetailsRecord { */ termsOfServiceAcceptedEtag: string | undefined; - /** - * Timestamp for last update. - */ - lastUpdateTime: Timestamp; - - /** - * When should we next update the information about the exchange? - */ - nextUpdateTime: Timestamp; - wireInfo: WireInfo; } @@ -629,20 +605,24 @@ export interface ExchangeRecord { permanent: boolean; /** - * Time when the update to the exchange has been started or - * undefined if no update is in progress. + * Last time when the exchange was updated. */ - updateStarted: Timestamp | undefined; + lastUpdate: Timestamp | undefined; /** - * Status of updating the info about the exchange. + * Next scheduled update for the exchange. * - * FIXME: Adapt this to recent changes regarding how - * updating exchange details works. + * (This field must always be present, so we can index on the timestamp.) */ - updateStatus: ExchangeUpdateStatus; + nextUpdate: Timestamp; - updateReason?: ExchangeUpdateReason; + /** + * Next time that we should check if coins need to be refreshed. + * + * Updated whenever the exchange's denominations are updated or when + * the refresh check has been done. + */ + nextRefreshCheck: Timestamp; lastError?: TalerErrorDetails; @@ -650,14 +630,6 @@ export interface ExchangeRecord { * Retry status for fetching updated information about the exchange. */ retryInfo: RetryInfo; - - /** - * Next time that we should check if coins need to be refreshed. - * - * Updated whenever the exchange's denominations are updated or when - * the refresh check has been done. - */ - nextRefreshCheck?: Timestamp; } /** |