types
This commit is contained in:
parent
95e638f513
commit
4cfae8f589
@ -38,6 +38,7 @@ import {
|
|||||||
import { TransactionHandle } from "../util/query";
|
import { TransactionHandle } from "../util/query";
|
||||||
import { InternalWalletState } from "./state";
|
import { InternalWalletState } from "./state";
|
||||||
import { getBalances, getBalancesInsideTransaction } from "./balance";
|
import { getBalances, getBalancesInsideTransaction } from "./balance";
|
||||||
|
import { ReserveType } from "../types/history";
|
||||||
|
|
||||||
function updateRetryDelay(
|
function updateRetryDelay(
|
||||||
oldDelay: Duration,
|
oldDelay: Duration,
|
||||||
@ -149,7 +150,9 @@ async function gatherReservePending(
|
|||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
// FIXME: this should be optimized by using an index for "onlyDue==true".
|
// FIXME: this should be optimized by using an index for "onlyDue==true".
|
||||||
await tx.iter(Stores.reserves).forEach((reserve) => {
|
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) {
|
if (!reserve.retryInfo.active) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
import { OperationError, WalletBalance } from "./walletTypes";
|
import { OperationError, WalletBalance } from "./walletTypes";
|
||||||
import { WithdrawalSource, RetryInfo, ReserveRecordStatus } from "./dbTypes";
|
import { WithdrawalSource, RetryInfo, ReserveRecordStatus } from "./dbTypes";
|
||||||
import { Timestamp, Duration } from "../util/time";
|
import { Timestamp, Duration } from "../util/time";
|
||||||
|
import { ReserveType } from "./history";
|
||||||
|
import { AmountString } from "./talerTypes";
|
||||||
|
|
||||||
export const enum PendingOperationType {
|
export const enum PendingOperationType {
|
||||||
Bug = "bug",
|
Bug = "bug",
|
||||||
@ -103,7 +105,7 @@ export interface PendingReserveOperation {
|
|||||||
retryInfo: RetryInfo | undefined;
|
retryInfo: RetryInfo | undefined;
|
||||||
stage: ReserveRecordStatus;
|
stage: ReserveRecordStatus;
|
||||||
timestampCreated: Timestamp;
|
timestampCreated: Timestamp;
|
||||||
reserveType: string;
|
reserveType: ReserveType;
|
||||||
reservePub: string;
|
reservePub: string;
|
||||||
bankWithdrawConfirmUrl?: string;
|
bankWithdrawConfirmUrl?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user