summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/withdraw.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 4070e39f4..eec92ba29 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -242,12 +242,9 @@ async function processPlanchetGenerate(
if (!denom) {
throw Error("invariant violated");
}
- if (withdrawalGroup.source.type != WithdrawalSourceType.Reserve) {
- throw Error("invariant violated");
- }
const reserve = await ws.db.get(
Stores.reserves,
- withdrawalGroup.source.reservePub,
+ withdrawalGroup.reservePub,
);
if (!reserve) {
throw Error("invariant violated");
@@ -420,7 +417,7 @@ async function processPlanchetVerifyAndStoreCoin(
if (!isValid) {
await ws.db.runWithWriteTransaction([Stores.planchets], async (tx) => {
- let planchet = await ws.db.getIndexed(Stores.planchets.byGroupAndIndex, [
+ let planchet = await tx.getIndexed(Stores.planchets.byGroupAndIndex, [
withdrawalGroupId,
coinIdx,
]);
@@ -700,7 +697,7 @@ async function processWithdrawGroupImpl(
if (finishedForFirstTime) {
ws.notify({
type: NotificationType.WithdrawGroupFinished,
- withdrawalSource: withdrawalGroup.source,
+ reservePub: withdrawalGroup.reservePub,
});
}
}