Quellcode durchsuchen
Do not enact a meal's explicit bolus when the meal is rejected
The `.meal` dispatch called `handleMealCommand` and then, independently,
enacted the payload's explicit bolus whenever `bolusAmount` was set — even
if the meal had been rejected during validation (for example, carbs over
the maximum). That could dose insulin for a meal that was never stored.
Move the explicit-bolus decision into `handleMealCommand`, after the carbs
are stored, so the bolus is only enacted once the meal itself succeeds.