@@ -339,7 +339,8 @@ class CorePerAccountStore {
339
339
required GlobalStore globalStore,
340
340
required this .connection,
341
341
required this .accountId,
342
- }) : _globalStore = globalStore;
342
+ }) : _globalStore = globalStore,
343
+ assert (connection.realmUrl == globalStore.getAccount (accountId)! .realmUrl);
343
344
344
345
final GlobalStore _globalStore;
345
346
final ApiConnection connection; // TODO(#135): update zulipFeatureLevel with events
@@ -422,7 +423,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
422
423
);
423
424
final channels = ChannelStoreImpl (initialSnapshot: initialSnapshot);
424
425
return PerAccountStore ._(
425
- globalStore: globalStore,
426
426
core: core,
427
427
queueId: queueId,
428
428
realmUrl: realmUrl,
@@ -465,7 +465,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
465
465
}
466
466
467
467
PerAccountStore ._({
468
- required GlobalStore globalStore,
469
468
required super .core,
470
469
required this .queueId,
471
470
required this .realmUrl,
@@ -487,8 +486,7 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
487
486
required this .unreads,
488
487
required this .recentDmConversationsView,
489
488
required this .recentSenders,
490
- }) : assert (realmUrl == globalStore.getAccount (core.accountId)! .realmUrl),
491
- assert (realmUrl == core.connection.realmUrl),
489
+ }) : assert (realmUrl == core.connection.realmUrl),
492
490
assert (emoji.realmUrl == realmUrl),
493
491
_realmEmptyTopicDisplayName = realmEmptyTopicDisplayName,
494
492
_emoji = emoji,
0 commit comments