From aad3a7bcf7faacefe88c5e1de03e4efff4b4fed0 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Fri, 28 Mar 2025 00:17:33 +0100 Subject: [PATCH] chore: update vendor purchase response --- src/services/purchaseService.ts | 3 ++- src/types/purchaseTypes.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/purchaseService.ts b/src/services/purchaseService.ts index 48069432..7f0170d2 100644 --- a/src/services/purchaseService.ts +++ b/src/services/purchaseService.ts @@ -99,7 +99,7 @@ export const handlePurchase = async ( Expiry: new Date(parseInt(offer.Expiry.$date.$numberLong)) }); } - prePurchaseInventoryChanges.RecentVendorPurchases = { + prePurchaseInventoryChanges.NewVendorPurchase = { VendorType: manifest.VendorInfo.TypeName, PurchaseHistory: [ { @@ -109,6 +109,7 @@ export const handlePurchase = async ( } ] }; + prePurchaseInventoryChanges.RecentVendorPurchases = prePurchaseInventoryChanges.NewVendorPurchase; } purchaseRequest.PurchaseParams.Quantity *= offer.QuantityMultiplier; } else { diff --git a/src/types/purchaseTypes.ts b/src/types/purchaseTypes.ts index f665f9da..51459454 100644 --- a/src/types/purchaseTypes.ts +++ b/src/types/purchaseTypes.ts @@ -44,7 +44,8 @@ export type IInventoryChanges = { MiscItems?: IMiscItem[]; EmailItems?: ITypeCount[]; Nemesis?: Partial; - RecentVendorPurchases?: IRecentVendorPurchaseClient; + NewVendorPurchase?: IRecentVendorPurchaseClient; // >= 38.5.0 + RecentVendorPurchases?: IRecentVendorPurchaseClient; // < 38.5.0 } & Record< Exclude< string,