diff options
author | Florian Dold <florian@dold.me> | 2023-11-09 13:32:08 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-11-09 14:54:27 +0100 |
commit | 7e3d6938bf5184b88ab4d0b75e4dc3d10af7c60a (patch) | |
tree | 788fc3b96d0aece0810c0654f9e0162eb9c1fe67 /packages/taler-wallet-core/src/operations/transactions.ts | |
parent | 1024665001060b8a33378ff45f12426a1b152f25 (diff) | |
download | wallet-core-7e3d6938bf5184b88ab4d0b75e4dc3d10af7c60a.tar.xz |
wallet-core: fix bogus timestamp logic
Diffstat (limited to 'packages/taler-wallet-core/src/operations/transactions.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/transactions.ts | 91 |
1 files changed, 44 insertions, 47 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index bebb3d60b..33ee2b424 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -31,8 +31,6 @@ import { stringifyPayPullUri, stringifyPayPushUri, TalerErrorCode, - TalerPreciseTimestamp, - TalerProtocolTimestamp, Transaction, TransactionByIdRequest, TransactionIdStr, @@ -50,12 +48,12 @@ import { DepositGroupRecord, ExchangeDetailsRecord, OperationRetryRecord, - PeerPullPaymentIncomingRecord, - PeerPullDebitRecordStatus, PeerPullCreditRecord, - PeerPushPaymentIncomingRecord, + PeerPullDebitRecordStatus, + PeerPullPaymentIncomingRecord, PeerPushCreditStatus, PeerPushDebitRecord, + PeerPushPaymentIncomingRecord, PurchaseRecord, PurchaseStatus, RefreshGroupRecord, @@ -68,7 +66,6 @@ import { } from "../db.js"; import { GetReadOnlyAccess, - timestampOptionalPreciseFromDb, timestampPreciseFromDb, timestampProtocolFromDb, WalletStoresV1, @@ -85,81 +82,56 @@ import { } from "./common.js"; import { abortDepositGroup, - failDepositTransaction, + computeDepositTransactionActions, computeDepositTransactionStatus, deleteDepositGroup, + failDepositTransaction, resumeDepositGroup, suspendDepositGroup, - computeDepositTransactionActions, } from "./deposits.js"; import { getExchangeDetails } from "./exchanges.js"; import { abortPayMerchant, - failPaymentTransaction, + computePayMerchantTransactionActions, computePayMerchantTransactionState, computeRefundTransactionState, expectProposalDownload, extractContractData, + failPaymentTransaction, resumePayMerchant, suspendPayMerchant, - computePayMerchantTransactionActions, } from "./pay-merchant.js"; import { - abortRefreshGroup, - failRefreshGroup, - computeRefreshTransactionState, - resumeRefreshGroup, - suspendRefreshGroup, - computeRefreshTransactionActions, -} from "./refresh.js"; -import { - abortTipTransaction, - failTipTransaction, - computeRewardTransactionStatus, - resumeTipTransaction, - suspendRewardTransaction, - computeTipTransactionActions, -} from "./reward.js"; -import { - abortWithdrawalTransaction, - augmentPaytoUrisForWithdrawal, - failWithdrawalTransaction, - computeWithdrawalTransactionStatus, - resumeWithdrawalTransaction, - suspendWithdrawalTransaction, - computeWithdrawalTransactionActions, -} from "./withdraw.js"; -import { - computePeerPullCreditTransactionState, + abortPeerPullCreditTransaction, computePeerPullCreditTransactionActions, - suspendPeerPullCreditTransaction, + computePeerPullCreditTransactionState, failPeerPullCreditTransaction, resumePeerPullCreditTransaction, - abortPeerPullCreditTransaction, + suspendPeerPullCreditTransaction, } from "./pay-peer-pull-credit.js"; import { - computePeerPullDebitTransactionState, + abortPeerPullDebitTransaction, computePeerPullDebitTransactionActions, - suspendPeerPullDebitTransaction, + computePeerPullDebitTransactionState, failPeerPullDebitTransaction, resumePeerPullDebitTransaction, - abortPeerPullDebitTransaction, + suspendPeerPullDebitTransaction, } from "./pay-peer-pull-debit.js"; import { - computePeerPushCreditTransactionState, + abortPeerPushCreditTransaction, computePeerPushCreditTransactionActions, - suspendPeerPushCreditTransaction, + computePeerPushCreditTransactionState, failPeerPushCreditTransaction, resumePeerPushCreditTransaction, - abortPeerPushCreditTransaction, + suspendPeerPushCreditTransaction, } from "./pay-peer-push-credit.js"; import { - computePeerPushDebitTransactionState, + abortPeerPushDebitTransaction, computePeerPushDebitTransactionActions, - suspendPeerPushDebitTransaction, + computePeerPushDebitTransactionState, failPeerPushDebitTransaction, resumePeerPushDebitTransaction, - abortPeerPushDebitTransaction, + suspendPeerPushDebitTransaction, } from "./pay-peer-push-debit.js"; import { iterRecordsForDeposit, @@ -173,6 +145,31 @@ import { iterRecordsForReward, iterRecordsForWithdrawal, } from "./pending.js"; +import { + abortRefreshGroup, + computeRefreshTransactionActions, + computeRefreshTransactionState, + failRefreshGroup, + resumeRefreshGroup, + suspendRefreshGroup, +} from "./refresh.js"; +import { + abortTipTransaction, + computeRewardTransactionStatus, + computeTipTransactionActions, + failTipTransaction, + resumeTipTransaction, + suspendRewardTransaction, +} from "./reward.js"; +import { + abortWithdrawalTransaction, + augmentPaytoUrisForWithdrawal, + computeWithdrawalTransactionActions, + computeWithdrawalTransactionStatus, + failWithdrawalTransaction, + resumeWithdrawalTransaction, + suspendWithdrawalTransaction, +} from "./withdraw.js"; const logger = new Logger("taler-wallet-core:transactions.ts"); |