From 1633b4390a197b0f4b7b19c9a638bd2dcb724544 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 25 Sep 2023 16:50:25 +0200 Subject: [PATCH] Don't loop gc exchange an additonal time when buying --- Deliveroo/DeliverooPlugin.Exchange.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Deliveroo/DeliverooPlugin.Exchange.cs b/Deliveroo/DeliverooPlugin.Exchange.cs index 50c6dda..43a74f1 100644 --- a/Deliveroo/DeliverooPlugin.Exchange.cs +++ b/Deliveroo/DeliverooPlugin.Exchange.cs @@ -177,7 +177,8 @@ partial class DeliverooPlugin if (SelectSelectYesno(0, s => s.StartsWith("Exchange "))) { - if (GetNextItemToPurchase(item) != null) + var nextItem = GetNextItemToPurchase(item); + if (nextItem != null && GetCurrentSealCount() >= _configuration.ReservedSealCount + nextItem.SealCost) CurrentStage = Stage.SelectRewardTier; else CurrentStage = Stage.CloseGcExchange;