fix(#194): align ChannelMessageStore device-key scope to >=10

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.
pull/202/head
Strycher 1 week ago
parent 7da6e2cde2
commit 9d632f495f

@ -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.

Loading…
Cancel
Save

Powered by TurnKey Linux.