From 9d632f495fe54ffb0e76b86ccfa3fb3995396372 Mon Sep 17 00:00:00 2001 From: Strycher Date: Sat, 11 Jul 2026 22:04:20 -0400 Subject: [PATCH] fix(#194): align ChannelMessageStore device-key scope to >=10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gemini review flagged setPublicKeyHex using `value.length > 10`, which would store an empty scope for an exactly-10-char device key (unreachable today — MeshCore public keys are 64 hex — but inconsistent with ChannelStore, which uses >=10). Align to >=10 for consistency and to remove the latent off-by-one. --- lib/storage/channel_message_store.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/channel_message_store.dart b/lib/storage/channel_message_store.dart index 55c1a47..ee60050 100644 --- a/lib/storage/channel_message_store.dart +++ b/lib/storage/channel_message_store.dart @@ -16,7 +16,7 @@ class ChannelMessageStore { String publicKeyHex = ''; set setPublicKeyHex(String value) => - publicKeyHex = value.length > 10 ? value.substring(0, 10) : ''; + publicKeyHex = value.length >= 10 ? value.substring(0, 10) : ''; /// Resolves a channel slot index to its channel's PSK hex — a stable identity /// that does not change when the channel moves slots. Set by the connector.