fix: reset passwordIndex in readConfig() to prevent stale auth state

Without this reset, if provision() was called first and incremented
passwordIndex, a subsequent readConfig() call would start at the wrong
password index and potentially skip the correct password entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Schwifty 2026-03-21 17:31:01 +00:00
parent ee366870ea
commit 06b258ac18

View file

@ -253,6 +253,7 @@ class BeaconProvisioner: NSObject, ObservableObject {
self.operationMode = .readingConfig
self.readCompletion = completion
self.readResult = BeaconCheckResult()
self.passwordIndex = 0
self.characteristics.removeAll()
self.dxSmartAuthenticated = false
self.dxSmartNotifySubscribed = false