Gift Badges: A few tweaks

This commit is contained in:
Scott Nonnenberg 2022-05-16 12:54:38 -07:00 committed by GitHub
parent 0a0b5a7bfe
commit a114e4e210
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 134 additions and 124 deletions

View file

@ -189,9 +189,10 @@ export type ProcessedGroupCallUpdate = Proto.DataMessage.IGroupCallUpdate;
export type ProcessedStoryContext = Proto.DataMessage.IStoryContext;
export type ProcessedGiftBadge = {
receiptCredentialPresentation: string;
level: number;
expiration: number;
id: string | undefined;
level: number;
receiptCredentialPresentation: string;
state: GiftBadgeStates;
};

View file

@ -249,6 +249,7 @@ export function processGiftBadge(
return {
expiration: timestamp + Number(receipt.getReceiptExpirationTime()),
id: undefined,
level: Number(receipt.getReceiptLevel()),
receiptCredentialPresentation: Bytes.toBase64(
giftBadge.receiptCredentialPresentation