summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-09-08 20:29:47 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-08 20:29:47 +0530
commit6c0be1cc956ce57fdc13509113448fe702b43da9 (patch)
tree15bd098eaf36230d597dafe3ada4d1dba3a0242a /packages/taler-wallet-core/src/operations/pay.ts
parent043a5f89fe020bbb55170a9fc355c3d699ad8761 (diff)
downloadwallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.tar.gz
wallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.tar.bz2
wallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.zip
DB cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts16
1 files changed, 3 insertions, 13 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts
index 50f863e48..c655aa7d8 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -27,15 +27,11 @@
import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
import {
CoinStatus,
- initRetryInfo,
ProposalRecord,
ProposalStatus,
PurchaseRecord,
Stores,
- updateRetryInfoTimeout,
- PayEventRecord,
WalletContractData,
- getRetryDuration,
CoinRecord,
DenominationRecord,
} from "../types/dbTypes";
@@ -80,6 +76,7 @@ import {
} from "../util/http";
import { TalerErrorCode } from "../TalerErrorCode";
import { URL } from "../util/url";
+import { initRetryInfo, updateRetryInfoTimeout, getRetryDuration } from "../util/retries";
/**
* Logger.
@@ -833,7 +830,7 @@ async function storeFirstPaySuccess(
): Promise<void> {
const now = getTimestampNow();
await ws.db.runWithWriteTransaction(
- [Stores.purchases, Stores.payEvents],
+ [Stores.purchases],
async (tx) => {
const purchase = await tx.get(Stores.purchases, proposalId);
@@ -864,13 +861,6 @@ async function storeFirstPaySuccess(
}
await tx.put(Stores.purchases, purchase);
- const payEvent: PayEventRecord = {
- proposalId,
- sessionId,
- timestamp: now,
- isReplay: !isFirst,
- };
- await tx.put(Stores.payEvents, payEvent);
},
);
}
@@ -881,7 +871,7 @@ async function storePayReplaySuccess(
sessionId: string | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction(
- [Stores.purchases, Stores.payEvents],
+ [Stores.purchases],
async (tx) => {
const purchase = await tx.get(Stores.purchases, proposalId);