summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts71
1 files changed, 36 insertions, 35 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index 8d66ee27b..12e799c71 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -57,6 +57,7 @@ import {
AttentionInfo,
Logger,
CoinPublicKeyString,
+ TalerPreciseTimestamp,
} from "@gnu-taler/taler-util";
import {
DbAccess,
@@ -236,14 +237,14 @@ export interface ReserveBankInfo {
*
* Set to undefined if that hasn't happened yet.
*/
- timestampReserveInfoPosted: TalerProtocolTimestamp | undefined;
+ timestampReserveInfoPosted: TalerPreciseTimestamp | undefined;
/**
* Time when the reserve was confirmed by the bank.
*
* Set to undefined if not confirmed yet.
*/
- timestampBankConfirmed: TalerProtocolTimestamp | undefined;
+ timestampBankConfirmed: TalerPreciseTimestamp | undefined;
}
/**
@@ -516,7 +517,7 @@ export interface ExchangeDetailsRecord {
tosAccepted:
| {
etag: string;
- timestamp: TalerProtocolTimestamp;
+ timestamp: TalerPreciseTimestamp;
}
| undefined;
@@ -556,7 +557,7 @@ export interface ExchangeDetailsPointer {
* Timestamp when the (masterPublicKey, currency) pointer
* has been updated.
*/
- updateClock: TalerProtocolTimestamp;
+ updateClock: TalerPreciseTimestamp;
}
/**
@@ -573,7 +574,7 @@ export interface ExchangeRecord {
*
* Used mostly in the UI to suggest exchanges.
*/
- lastWithdrawal?: TalerProtocolTimestamp;
+ lastWithdrawal?: TalerPreciseTimestamp;
/**
* Pointer to the current exchange details.
@@ -595,14 +596,14 @@ export interface ExchangeRecord {
/**
* Last time when the exchange was updated (both /keys and /wire).
*/
- lastUpdate: TalerProtocolTimestamp | undefined;
+ lastUpdate: TalerPreciseTimestamp | undefined;
/**
* Next scheduled update for the exchange.
*
* (This field must always be present, so we can index on the timestamp.)
*/
- nextUpdate: TalerProtocolTimestamp;
+ nextUpdate: TalerPreciseTimestamp;
lastKeysEtag: string | undefined;
@@ -614,7 +615,7 @@ export interface ExchangeRecord {
* Updated whenever the exchange's denominations are updated or when
* the refresh check has been done.
*/
- nextRefreshCheck: TalerProtocolTimestamp;
+ nextRefreshCheck: TalerPreciseTimestamp;
/**
* Public key of the reserve that we're currently using for
@@ -803,7 +804,7 @@ export interface TipRecord {
* Has the user accepted the tip? Only after the tip has been accepted coins
* withdrawn from the tip may be used.
*/
- acceptedTimestamp: TalerProtocolTimestamp | undefined;
+ acceptedTimestamp: TalerPreciseTimestamp | undefined;
/**
* The tipped amount.
@@ -856,7 +857,7 @@ export interface TipRecord {
*/
merchantTipId: string;
- createdTimestamp: TalerProtocolTimestamp;
+ createdTimestamp: TalerPreciseTimestamp;
/**
* The url to be redirected after the tip is accepted.
@@ -866,7 +867,7 @@ export interface TipRecord {
* Timestamp for when the wallet finished picking up the tip
* from the merchant.
*/
- pickedUpTimestamp: TalerProtocolTimestamp | undefined;
+ pickedUpTimestamp: TalerPreciseTimestamp | undefined;
}
export enum RefreshCoinStatus {
@@ -974,12 +975,12 @@ export interface RefreshGroupRecord {
*/
statusPerCoin: RefreshCoinStatus[];
- timestampCreated: TalerProtocolTimestamp;
+ timestampCreated: TalerPreciseTimestamp;
/**
* Timestamp when the refresh session finished.
*/
- timestampFinished: TalerProtocolTimestamp | undefined;
+ timestampFinished: TalerPreciseTimestamp | undefined;
}
/**
@@ -1233,7 +1234,7 @@ export interface PurchaseRecord {
* Timestamp of the first time that sending a payment to the merchant
* for this purchase was successful.
*/
- timestampFirstSuccessfulPay: TalerProtocolTimestamp | undefined;
+ timestampFirstSuccessfulPay: TalerPreciseTimestamp | undefined;
merchantPaySig: string | undefined;
@@ -1242,13 +1243,13 @@ export interface PurchaseRecord {
/**
* When was the purchase record created?
*/
- timestamp: TalerProtocolTimestamp;
+ timestamp: TalerPreciseTimestamp;
/**
* When was the purchase made?
* Refers to the time that the user accepted.
*/
- timestampAccept: TalerProtocolTimestamp | undefined;
+ timestampAccept: TalerPreciseTimestamp | undefined;
/**
* Pending refunds for the purchase. A refund is pending
@@ -1262,7 +1263,7 @@ export interface PurchaseRecord {
* When was the last refund made?
* Set to 0 if no refund was made on the purchase.
*/
- timestampLastRefundStatus: TalerProtocolTimestamp | undefined;
+ timestampLastRefundStatus: TalerPreciseTimestamp | undefined;
/**
* Last session signature that we submitted to /pay (if any).
@@ -1312,12 +1313,12 @@ export interface WalletBackupConfState {
/**
* Timestamp stored in the last backup.
*/
- lastBackupTimestamp?: TalerProtocolTimestamp;
+ lastBackupTimestamp?: TalerPreciseTimestamp;
/**
* Last time we tried to do a backup.
*/
- lastBackupCheckTimestamp?: TalerProtocolTimestamp;
+ lastBackupCheckTimestamp?: TalerPreciseTimestamp;
lastBackupNonce?: string;
}
@@ -1421,12 +1422,12 @@ export interface WithdrawalGroupRecord {
* When was the withdrawal operation started started?
* Timestamp in milliseconds.
*/
- timestampStart: TalerProtocolTimestamp;
+ timestampStart: TalerPreciseTimestamp;
/**
* When was the withdrawal operation completed?
*/
- timestampFinish?: TalerProtocolTimestamp;
+ timestampFinish?: TalerPreciseTimestamp;
/**
* Current status of the reserve.
@@ -1517,9 +1518,9 @@ export interface RecoupGroupRecord {
exchangeBaseUrl: string;
- timestampStarted: TalerProtocolTimestamp;
+ timestampStarted: TalerPreciseTimestamp;
- timestampFinished: TalerProtocolTimestamp | undefined;
+ timestampFinished: TalerPreciseTimestamp | undefined;
/**
* Public keys that identify the coins being recouped
@@ -1553,7 +1554,7 @@ export type BackupProviderState =
}
| {
tag: BackupProviderStateTag.Ready;
- nextBackupTimestamp: TalerProtocolTimestamp;
+ nextBackupTimestamp: TalerPreciseTimestamp;
}
| {
tag: BackupProviderStateTag.Retrying;
@@ -1598,7 +1599,7 @@ export interface BackupProviderRecord {
* Does NOT correspond to the timestamp of the backup,
* which only changes when the backup content changes.
*/
- lastBackupCycleTimestamp?: TalerProtocolTimestamp;
+ lastBackupCycleTimestamp?: TalerPreciseTimestamp;
/**
* Proposal that we're currently trying to pay for.
@@ -1693,9 +1694,9 @@ export interface DepositGroupRecord {
*/
effectiveDepositAmount: AmountString;
- timestampCreated: TalerProtocolTimestamp;
+ timestampCreated: TalerPreciseTimestamp;
- timestampFinished: TalerProtocolTimestamp | undefined;
+ timestampFinished: TalerPreciseTimestamp | undefined;
operationStatus: DepositOperationStatus;
@@ -1728,7 +1729,7 @@ export interface GhostDepositGroupRecord {
* When multiple deposits for the same contract terms hash
* have a different timestamp, we choose the earliest one.
*/
- timestamp: TalerProtocolTimestamp;
+ timestamp: TalerPreciseTimestamp;
contractTermsHash: string;
@@ -1821,7 +1822,7 @@ export interface PeerPushPaymentInitiationRecord {
purseExpiration: TalerProtocolTimestamp;
- timestampCreated: TalerProtocolTimestamp;
+ timestampCreated: TalerPreciseTimestamp;
/**
* Status of the peer push payment initiation.
@@ -1882,7 +1883,7 @@ export interface PeerPullPaymentInitiationRecord {
contractTerms: PeerContractTerms;
- mergeTimestamp: TalerProtocolTimestamp;
+ mergeTimestamp: TalerPreciseTimestamp;
mergeReserveRowId: number;
@@ -1924,7 +1925,7 @@ export interface PeerPushPaymentIncomingRecord {
contractPriv: string;
- timestamp: TalerProtocolTimestamp;
+ timestamp: TalerPreciseTimestamp;
estimatedAmountEffective: AmountString;
@@ -1984,7 +1985,7 @@ export interface PeerPullPaymentIncomingRecord {
contractTerms: PeerContractTerms;
- timestampCreated: TalerProtocolTimestamp;
+ timestampCreated: TalerPreciseTimestamp;
/**
* Contract priv that we got from the other party.
@@ -2081,7 +2082,7 @@ export interface UserAttentionRecord {
/**
* When the user mark this notification as read.
*/
- read: TalerProtocolTimestamp | undefined;
+ read: TalerPreciseTimestamp | undefined;
}
export interface DbExchangeHandle {
@@ -2125,7 +2126,7 @@ export interface RefundGroupRecord {
/**
* Timestamp when the refund group was created.
*/
- timestampCreated: TalerProtocolTimestamp;
+ timestampCreated: TalerPreciseTimestamp;
proposalId: string;
@@ -2180,7 +2181,7 @@ export interface RefundItemRecord {
/**
* Time when the wallet became aware of the refund.
*/
- obtainedTime: TalerProtocolTimestamp;
+ obtainedTime: TalerPreciseTimestamp;
refundAmount: AmountString;