diff options
| author | Sebastian <sebasjm@gmail.com> | 2022-05-29 01:23:15 -0300 |
|---|---|---|
| committer | Sebastian <sebasjm@gmail.com> | 2022-05-29 01:23:21 -0300 |
| commit | 029340469ac661bab1450b1ff4dcc6e717780e5b (patch) | |
| tree | 0e4495cbc332ed5ed2059b8ba12de9be6c2dc98e /packages/taler-wallet-core/src/operations/refund.ts | |
| parent | ced08c502fc36ef90bb34fafcb1e2cbfe82f1280 (diff) | |
show refund info in purchase
notify refund pending with accept button on the purchase details
better payto box
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refund.ts')
| -rw-r--r-- | packages/taler-wallet-core/src/operations/refund.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/refund.ts b/packages/taler-wallet-core/src/operations/refund.ts index 186fbf7d3..28a92286b 100644 --- a/packages/taler-wallet-core/src/operations/refund.ts +++ b/packages/taler-wallet-core/src/operations/refund.ts @@ -573,7 +573,7 @@ export async function applyRefund( throw Error("invalid refund URI"); } - let purchase = await ws.db + const purchase = await ws.db .mktx((x) => ({ purchases: x.purchases, })) @@ -590,7 +590,15 @@ export async function applyRefund( ); } - const proposalId = purchase.proposalId; + return applyRefundFromPurchaseId(ws, purchase.proposalId) +} + +export async function applyRefundFromPurchaseId( + ws: InternalWalletState, + proposalId: string, +): Promise<ApplyRefundResponse> { + + logger.trace("applying refund for purchase", proposalId); logger.info("processing purchase for refund"); const success = await ws.db @@ -620,7 +628,7 @@ export async function applyRefund( }); } - purchase = await ws.db + const purchase = await ws.db .mktx((x) => ({ purchases: x.purchases, })) |
