From 6eaa1d89599c68f84c54c5df584368f0f8145bcd Mon Sep 17 00:00:00 2001 From: Sainan Date: Sat, 4 May 2024 22:20:00 +0200 Subject: [PATCH] feat: purchasing glyphs & UI customisations --- src/services/purchaseService.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/services/purchaseService.ts b/src/services/purchaseService.ts index 7865ee00..508cb736 100644 --- a/src/services/purchaseService.ts +++ b/src/services/purchaseService.ts @@ -49,6 +49,9 @@ export const handlePurchase = async (purchaseRequest: IPurchaseRequest, accountI case "Boosters": inventoryChanges = await handleBoostersPurchase(internalName, accountId); break; + case "Interface": + inventoryChanges = await handleCustomizationPurchase(internalName, accountId); + break; default: const errorMessage = `unknown store category: ${storeCategory} not implemented or new`; logger.error(errorMessage); @@ -167,8 +170,9 @@ const handleTypesPurchase = async (typesName: string, accountId: string) => { const typeCategory = getStoreItemTypesCategory(typesName); logger.debug(`type category ${typeCategory}`); switch (typeCategory) { + case "AvatarImages": case "SuitCustomizations": - return await handleSuitCustomizationsPurchase(typesName, accountId); + return await handleCustomizationPurchase(typesName, accountId); // case "Recipes": // break; case "Sentinels": @@ -193,7 +197,7 @@ const handleSentinelPurchase = async (sentinelName: string, accountId: string) = }; }; -const handleSuitCustomizationsPurchase = async (customizationName: string, accountId: string) => { +const handleCustomizationPurchase = async (customizationName: string, accountId: string) => { const customization = await addCustomization(customizationName, accountId); return {