From ba795150a9ba2cad75a579fdea17478d410bbc49 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:45:33 +0100 Subject: [PATCH] chore: fix shape of RecentVendorPurchases in InventoryChanges --- src/services/purchaseService.ts | 22 ++++++++++------------ src/types/purchaseTypes.ts | 2 ++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/services/purchaseService.ts b/src/services/purchaseService.ts index c17b562f..48069432 100644 --- a/src/services/purchaseService.ts +++ b/src/services/purchaseService.ts @@ -99,18 +99,16 @@ export const handlePurchase = async ( Expiry: new Date(parseInt(offer.Expiry.$date.$numberLong)) }); } - prePurchaseInventoryChanges.RecentVendorPurchases = [ - { - VendorType: manifest.VendorInfo.TypeName, - PurchaseHistory: [ - { - ItemId: ItemId, - NumPurchased: numPurchased, - Expiry: offer.Expiry - } - ] - } - ]; + prePurchaseInventoryChanges.RecentVendorPurchases = { + VendorType: manifest.VendorInfo.TypeName, + PurchaseHistory: [ + { + ItemId: ItemId, + NumPurchased: numPurchased, + Expiry: offer.Expiry + } + ] + }; } purchaseRequest.PurchaseParams.Quantity *= offer.QuantityMultiplier; } else { diff --git a/src/types/purchaseTypes.ts b/src/types/purchaseTypes.ts index c90e4588..f665f9da 100644 --- a/src/types/purchaseTypes.ts +++ b/src/types/purchaseTypes.ts @@ -5,6 +5,7 @@ import { IMiscItem, INemesisClient, ITypeCount, + IRecentVendorPurchaseClient, TEquipmentKey } from "./inventoryTypes/inventoryTypes"; @@ -43,6 +44,7 @@ export type IInventoryChanges = { MiscItems?: IMiscItem[]; EmailItems?: ITypeCount[]; Nemesis?: Partial; + RecentVendorPurchases?: IRecentVendorPurchaseClient; } & Record< Exclude< string,