diff options
author | Florian Dold <florian@dold.me> | 2024-04-15 18:58:53 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-15 18:59:04 +0200 |
commit | fc77825639c5da6d4c9a209ad8cf6df77c96fbae (patch) | |
tree | 765a6f4f6cf52d62f7cbb3daed23b858df23f9dc /packages/taler-wallet-core/src/transactions.ts | |
parent | ffd2e70fec069441d56db73da9fa9c8e0633e0dc (diff) | |
download | wallet-core-fc77825639c5da6d4c9a209ad8cf6df77c96fbae.tar.gz wallet-core-fc77825639c5da6d4c9a209ad8cf6df77c96fbae.tar.bz2 wallet-core-fc77825639c5da6d4c9a209ad8cf6df77c96fbae.zip |
wallet-core: remove more remains of rewards
Diffstat (limited to 'packages/taler-wallet-core/src/transactions.ts')
-rw-r--r-- | packages/taler-wallet-core/src/transactions.ts | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/packages/taler-wallet-core/src/transactions.ts b/packages/taler-wallet-core/src/transactions.ts index 536f0de4b..43ef09220 100644 --- a/packages/taler-wallet-core/src/transactions.ts +++ b/packages/taler-wallet-core/src/transactions.ts @@ -129,7 +129,6 @@ import { computeRefreshTransactionState, RefreshTransactionContext, } from "./refresh.js"; -import { RewardTransactionContext } from "./reward.js"; import type { WalletExecutionContext } from "./wallet.js"; import { augmentPaytoUrisForWithdrawal, @@ -199,7 +198,6 @@ function shouldSkipSearch( */ const txOrder: { [t in TransactionType]: number } = { [TransactionType.Withdrawal]: 1, - [TransactionType.Reward]: 2, [TransactionType.Payment]: 3, [TransactionType.PeerPullCredit]: 4, [TransactionType.PeerPullDebit]: 5, @@ -333,10 +331,6 @@ export async function getTransactionById( ); } - case TransactionType.Reward: { - throw Error("unsupported operation"); - } - case TransactionType.Deposit: { const depositGroupId = parsedTx.depositGroupId; return await wex.db.runReadWriteTx( @@ -1531,7 +1525,6 @@ export type ParsedTransactionIdentifier = | { tag: TransactionType.PeerPushDebit; pursePub: string } | { tag: TransactionType.Refresh; refreshGroupId: string } | { tag: TransactionType.Refund; refundGroupId: string } - | { tag: TransactionType.Reward; walletRewardId: string } | { tag: TransactionType.Withdrawal; withdrawalGroupId: string } | { tag: TransactionType.InternalWithdrawal; withdrawalGroupId: string } | { tag: TransactionType.Recoup; recoupGroupId: string } @@ -1557,8 +1550,6 @@ export function constructTransactionIdentifier( return `txn:${pTxId.tag}:${pTxId.refreshGroupId}` as TransactionIdStr; case TransactionType.Refund: return `txn:${pTxId.tag}:${pTxId.refundGroupId}` as TransactionIdStr; - case TransactionType.Reward: - return `txn:${pTxId.tag}:${pTxId.walletRewardId}` as TransactionIdStr; case TransactionType.Withdrawal: return `txn:${pTxId.tag}:${pTxId.withdrawalGroupId}` as TransactionIdStr; case TransactionType.InternalWithdrawal: @@ -1616,11 +1607,6 @@ export function parseTransactionIdentifier( tag: TransactionType.Refund, refundGroupId: rest[0], }; - case TransactionType.Reward: - return { - tag: TransactionType.Reward, - walletRewardId: rest[0], - }; case TransactionType.Withdrawal: return { tag: TransactionType.Withdrawal, @@ -1669,11 +1655,6 @@ function maybeTaskFromTransaction( tag: PendingTaskType.Purchase, proposalId: parsedTx.proposalId, }); - case TransactionType.Reward: - return constructTaskIdentifier({ - tag: PendingTaskType.RewardPickup, - walletRewardId: parsedTx.walletRewardId, - }); case TransactionType.Refresh: return constructTaskIdentifier({ tag: PendingTaskType.Refresh, @@ -1753,8 +1734,6 @@ async function getContextForTransaction( return new PeerPushCreditTransactionContext(wex, tx.peerPushCreditId); case TransactionType.Refund: return new RefundTransactionContext(wex, tx.refundGroupId); - case TransactionType.Reward: - return new RewardTransactionContext(wex, tx.walletRewardId); case TransactionType.Recoup: //return new RecoupTransactionContext(ws, tx.recoupGroupId); throw new Error("not yet supported"); |