don't use outdated purchase info
This commit is contained in:
parent
2c57d42128
commit
0b6b757f65
@ -2697,8 +2697,13 @@ export async function processPurchaseQueryRefund(
|
|||||||
await ws.db
|
await ws.db
|
||||||
.mktx((x) => [x.purchases])
|
.mktx((x) => [x.purchases])
|
||||||
.runReadWrite(async (tx) => {
|
.runReadWrite(async (tx) => {
|
||||||
purchase.purchaseStatus = PurchaseStatus.Paid;
|
const p = await tx.purchases.get(proposalId);
|
||||||
await tx.purchases.put(purchase);
|
if (!p) {
|
||||||
|
logger.warn("purchase does not exist anymore");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
p.purchaseStatus = PurchaseStatus.Paid;
|
||||||
|
await tx.purchases.put(p);
|
||||||
});
|
});
|
||||||
|
|
||||||
// No new refunds, but we still need to notify
|
// No new refunds, but we still need to notify
|
||||||
|
Loading…
Reference in New Issue
Block a user