feat(store): show native receipts for purchases
Persist the actual grant in the purchase log and open one native receipt per unread entry. Keep pending receipts during log trimming and resume them when the price table becomes available. Verified TypeScript types, GUI patch application, and Quirrel syntax.
This commit is contained in:
1 parent
98812fa9c2
commit
4b1e226c34
13 files changed
+376
-6
No files matched your search
@@ -21,6 +21,10 @@ export function serverTimeNow(): ServerTime {
|
||||
return serverTimeFromUnixMs(Date.now());
|
||||
}
|
||||
|
||||
export function serverTimeToUnixSeconds(time: ServerTime): number {
|
||||
return Number((time - UNIX_EPOCH) / (1000n * TICKS_PER_MILLISECOND));
|
||||
}
|
||||
|
||||
/** A whole or fractional number of hours as ticks. */
|
||||
export function hoursToTicks(hours: number): bigint {
|
||||
return BigInt(Math.round(hours * 3_600_000)) * TICKS_PER_MILLISECOND;
|
||||
|
||||
Reference in new issue
Block a user