aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pending.ts
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-08-03 19:35:52 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-08-03 19:35:52 +0200
commit77ea209ddb6d457db0ce113f91247207cc29fbd8 (patch)
tree93eec60ae611ffa38d81ba60fa3e5f76ceca5c04 /packages/taler-wallet-core/src/operations/pending.ts
parent2b9faf3d4ee00833c3431f1e8fc26bb102594e0f (diff)
parentee47aa4837fedcaa8257b57138ea34fda220d2b7 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pending.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pending.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts
index 870437e2e..cc9217d67 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -32,7 +32,7 @@ import {
PeerPushPaymentIncomingStatus,
PeerPullPaymentInitiationStatus,
WithdrawalGroupStatus,
- TipRecordStatus,
+ RewardRecordStatus,
DepositOperationStatus,
} from "../db.js";
import {
@@ -232,17 +232,17 @@ async function gatherDepositPending(
async function gatherTipPending(
ws: InternalWalletState,
tx: GetReadOnlyAccess<{
- tips: typeof WalletStoresV1.tips;
+ rewards: typeof WalletStoresV1.rewards;
operationRetries: typeof WalletStoresV1.operationRetries;
}>,
now: AbsoluteTime,
resp: PendingOperationsResponse,
): Promise<void> {
const range = GlobalIDB.KeyRange.bound(
- TipRecordStatus.PendingPickup,
- TipRecordStatus.PendingPickup,
+ RewardRecordStatus.PendingPickup,
+ RewardRecordStatus.PendingPickup,
);
- await tx.tips.indexes.byStatus.iter(range).forEachAsync(async (tip) => {
+ await tx.rewards.indexes.byStatus.iter(range).forEachAsync(async (tip) => {
// FIXME: The tip record needs a proper status field!
if (tip.pickedUpTimestamp) {
return;
@@ -252,13 +252,13 @@ async function gatherTipPending(
const timestampDue = retryRecord?.retryInfo.nextRetry ?? AbsoluteTime.now();
if (tip.acceptedTimestamp) {
resp.pendingOperations.push({
- type: PendingTaskType.TipPickup,
+ type: PendingTaskType.RewardPickup,
...getPendingCommon(ws, opId, timestampDue),
givesLifeness: true,
timestampDue: retryRecord?.retryInfo.nextRetry ?? AbsoluteTime.now(),
merchantBaseUrl: tip.merchantBaseUrl,
- tipId: tip.walletTipId,
- merchantTipId: tip.merchantTipId,
+ tipId: tip.walletRewardId,
+ merchantTipId: tip.merchantRewardId,
});
}
});
@@ -494,7 +494,7 @@ export async function getPendingOperations(
x.refreshGroups,
x.coins,
x.withdrawalGroups,
- x.tips,
+ x.rewards,
x.purchases,
x.planchets,
x.depositGroups,