summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pending.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-08-03 18:35:07 +0200
committerFlorian Dold <florian@dold.me>2023-08-03 18:35:07 +0200
commitfdbd55d2bde0961a4c1ff26b04e442459ab782b0 (patch)
treed0d04f42a5477f6d7d39a8940d59ff1548166711 /packages/taler-wallet-core/src/operations/pending.ts
parent0fe4840ca2612dda06417cdebe5229eea98180be (diff)
downloadwallet-core-fdbd55d2bde0961a4c1ff26b04e442459ab782b0.tar.gz
wallet-core-fdbd55d2bde0961a4c1ff26b04e442459ab782b0.tar.bz2
wallet-core-fdbd55d2bde0961a4c1ff26b04e442459ab782b0.zip
-towards tip->reward rename
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,