diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 16 |
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); |