Skip to content

Commit 22334a4

Browse files
committed
The API returns "scopes":["#*"] for zones with no regional scope. The code only checked for '*' as the wildcard, so '#*' fell through to the
scope-setting path.
1 parent 8c9f7c9 commit 22334a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/providers/app_state_provider.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,11 +1086,13 @@ class AppStateProvider extends ChangeNotifier with WidgetsBindingObserver {
10861086
}
10871087

10881088
// Set flood scope from API response (regional TX filtering)
1089-
// "*" = wildcard/global → no scope (unscoped flood, same as before)
1089+
// "*" or "#*" = wildcard/global → no scope (unscoped flood, same as before)
10901090
// Any other value (e.g., "ottawa") → derive TransportKey and set scope
10911091
final apiScopes = _apiService.scopes;
1092-
if (apiScopes.isNotEmpty && apiScopes.first != '*') {
1093-
final scopeName = apiScopes.first;
1092+
final firstScope = apiScopes.isNotEmpty ? apiScopes.first : null;
1093+
final isWildcard = firstScope == null || firstScope == '*' || firstScope == '#*';
1094+
if (!isWildcard) {
1095+
final scopeName = firstScope;
10941096
_scope = scopeName.startsWith('#') ? scopeName : '#$scopeName';
10951097
final scopeKey = CryptoService.deriveScopeKey(scopeName);
10961098
debugLog('[CONN] Setting flood scope: $scopeName');

0 commit comments

Comments
 (0)