gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/06: types


From: gnunet
Subject: [taler-wallet-core] 01/06: types
Date: Mon, 06 Apr 2020 10:45:57 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

commit 4cfae8f5893d1fc6acec4d97c2d95be016f52064
Author: Florian Dold <address@hidden>
AuthorDate: Mon Apr 6 12:54:49 2020 +0530

    types
---
 src/operations/pending.ts | 5 ++++-
 src/types/pending.ts      | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/operations/pending.ts b/src/operations/pending.ts
index b0bb9a7c..106e5053 100644
--- a/src/operations/pending.ts
+++ b/src/operations/pending.ts
@@ -38,6 +38,7 @@ import {
 import { TransactionHandle } from "../util/query";
 import { InternalWalletState } from "./state";
 import { getBalances, getBalancesInsideTransaction } from "./balance";
+import { ReserveType } from "../types/history";
 
 function updateRetryDelay(
   oldDelay: Duration,
@@ -149,7 +150,9 @@ async function gatherReservePending(
 ): Promise<void> {
   // FIXME: this should be optimized by using an index for "onlyDue==true".
   await tx.iter(Stores.reserves).forEach((reserve) => {
-    const reserveType = reserve.bankWithdrawStatusUrl ? "taler-bank" : 
"manual";
+    const reserveType = reserve.bankWithdrawStatusUrl
+      ? ReserveType.TalerBankWithdraw
+      : ReserveType.Manual;
     if (!reserve.retryInfo.active) {
       return;
     }
diff --git a/src/types/pending.ts b/src/types/pending.ts
index 1471fa19..5bca8c39 100644
--- a/src/types/pending.ts
+++ b/src/types/pending.ts
@@ -24,6 +24,8 @@
 import { OperationError, WalletBalance } from "./walletTypes";
 import { WithdrawalSource, RetryInfo, ReserveRecordStatus } from "./dbTypes";
 import { Timestamp, Duration } from "../util/time";
+import { ReserveType } from "./history";
+import { AmountString } from "./talerTypes";
 
 export const enum PendingOperationType {
   Bug = "bug",
@@ -103,7 +105,7 @@ export interface PendingReserveOperation {
   retryInfo: RetryInfo | undefined;
   stage: ReserveRecordStatus;
   timestampCreated: Timestamp;
-  reserveType: string;
+  reserveType: ReserveType;
   reservePub: string;
   bankWithdrawConfirmUrl?: string;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]