diff --git a/project/src/services/PaymentService.ts b/project/src/services/PaymentService.ts index aa4222c7..f42371d7 100644 --- a/project/src/services/PaymentService.ts +++ b/project/src/services/PaymentService.ts @@ -256,6 +256,12 @@ export class PaymentService { currencyTpl, pmcData.Inventory.stash, ); + + //Ensure all money items found have a upd + for (const moneyStack of moneyItemsInInventory) { + moneyStack.upd ??= { StackObjectsCount: 1 }; + } + const amountAvailable = moneyItemsInInventory.reduce( (accumulator, item) => accumulator + item.upd.StackObjectsCount, 0,