From f3ed4e4f2fb0134d450553fc1eee44c2269ead54 Mon Sep 17 00:00:00 2001 From: sajee_techi Date: Fri, 23 Jan 2026 16:38:14 +0530 Subject: [PATCH 1/4] CommunityConfig with closed attribute --- lib/services/config/config.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/services/config/config.dart b/lib/services/config/config.dart index 62c87085..f4a3c5df 100644 --- a/lib/services/config/config.dart +++ b/lib/services/config/config.dart @@ -62,6 +62,7 @@ class CommunityConfig { final String logo; final String? customDomain; final bool hidden; + final bool closed; final ColorTheme theme; final ContractLocation profile; final ContractLocation primaryToken; @@ -76,6 +77,7 @@ class CommunityConfig { required this.logo, this.customDomain, this.hidden = false, + this.closed = false, required this.theme, required this.profile, required this.primaryToken, @@ -96,6 +98,7 @@ class CommunityConfig { logo: json['logo'] ?? '', customDomain: json['custom_domain'], hidden: json['hidden'] ?? false, + closed: json['closed'] ?? false, theme: theme, profile: ContractLocation.fromJson(json['profile']), primaryToken: ContractLocation.fromJson(json['primary_token']), @@ -117,6 +120,7 @@ class CommunityConfig { 'logo': logo, 'custom_domain': customDomain, 'hidden': hidden, + 'closed': closed, 'theme': theme, 'profile': profile.toJson(), 'primary_token': primaryToken.toJson(), From 94148dee3700f1a96bc3d6f96da4c12ca18b397f Mon Sep 17 00:00:00 2001 From: sajee_techi Date: Fri, 23 Jan 2026 16:39:25 +0530 Subject: [PATCH 2/4] SFLUV Community (Polygon) - closed attribute --- assets/config/v5/communities.json | 10 ++++++++++ assets/config/v5/communities.test.json | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/assets/config/v5/communities.json b/assets/config/v5/communities.json index 08d80601..9bbb166c 100644 --- a/assets/config/v5/communities.json +++ b/assets/config/v5/communities.json @@ -458,6 +458,14 @@ "desc": "SFLUV has migrated from Polygon to BeraChain, so this community (SFLUV Polygon) has been closed. Click the link below to create an account in the new SFLUV community. Your SFLUV Polygon balance will be transferred over once you have a new account.", "button": "Migrate" } + }, + { + "url": "https://app.sfluv.org/map", + "icon": "https://assets.citizenwallet.xyz/wallet-config/_images/sfluv.svg", + "name": "Map", + "featured": true, + "signature": true, + "launch_mode": "webview" } ], "version": 5, @@ -483,6 +491,8 @@ "logo": "https://assets.citizenwallet.xyz/wallet-config/_images/sfluv.svg", "name": "SFLUV Community (Polygon)", "alias": "wallet.sfluv.org", + "hidden": true, + "closed": true, "theme": { "primary": "#eb6c6c" }, diff --git a/assets/config/v5/communities.test.json b/assets/config/v5/communities.test.json index 08d80601..9bbb166c 100644 --- a/assets/config/v5/communities.test.json +++ b/assets/config/v5/communities.test.json @@ -458,6 +458,14 @@ "desc": "SFLUV has migrated from Polygon to BeraChain, so this community (SFLUV Polygon) has been closed. Click the link below to create an account in the new SFLUV community. Your SFLUV Polygon balance will be transferred over once you have a new account.", "button": "Migrate" } + }, + { + "url": "https://app.sfluv.org/map", + "icon": "https://assets.citizenwallet.xyz/wallet-config/_images/sfluv.svg", + "name": "Map", + "featured": true, + "signature": true, + "launch_mode": "webview" } ], "version": 5, @@ -483,6 +491,8 @@ "logo": "https://assets.citizenwallet.xyz/wallet-config/_images/sfluv.svg", "name": "SFLUV Community (Polygon)", "alias": "wallet.sfluv.org", + "hidden": true, + "closed": true, "theme": { "primary": "#eb6c6c" }, From a82991b75be18bd3b8e628dabb8cdd6a5813d720 Mon Sep 17 00:00:00 2001 From: sajee_techi Date: Fri, 23 Jan 2026 17:33:38 +0530 Subject: [PATCH 3/4] commuity closed banner - display/hide from screen navigation --- lib/screens/wallet/screen.dart | 80 +++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/lib/screens/wallet/screen.dart b/lib/screens/wallet/screen.dart index 86278c61..4e6c5c94 100644 --- a/lib/screens/wallet/screen.dart +++ b/lib/screens/wallet/screen.dart @@ -87,6 +87,7 @@ class WalletScreenState extends State String? _sendToURL; Config? _config; bool _isClosedBannerDismissed = false; + int _bannerResetKey = 0; @override void initState() { @@ -374,6 +375,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); navigator.go('/wallet/$_address'); } @@ -595,6 +601,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } void handleReceive() async { @@ -602,10 +613,16 @@ class WalletScreenState extends State final navigator = GoRouter.of(context); - navigator.push('/wallet/$_address/receive', extra: { + await navigator.push('/wallet/$_address/receive', extra: { 'logic': _logic, 'profilesLogic': _profilesLogic, }); + + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } Future handlePlugin(PluginConfig pluginConfig) async { @@ -700,6 +717,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } Future handleMint({String? receiveParams}) async { @@ -721,6 +743,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } void handleVouchers() async { @@ -742,6 +769,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } void handleCopy(String value) { @@ -768,6 +800,11 @@ class WalletScreenState extends State _profileLogic.resume(); _profilesLogic.resume(); _voucherLogic.resume(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); } void handleLoad(String address) async { @@ -785,6 +822,11 @@ class WalletScreenState extends State if (args == null) { _logic.resumeFetching(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); return; } @@ -792,6 +834,11 @@ class WalletScreenState extends State if (address == _address && alias == _alias) { _logic.resumeFetching(); + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); return; } @@ -1201,13 +1248,14 @@ class WalletScreenState extends State final isOffline = eventServiceState == EventServiceState.error || eventServiceState == EventServiceState.connecting; - final isCommunityClosed = eventServiceState == EventServiceState.closed; + final config = context.select((WalletState state) => state.config); + final isCommunityClosed = eventServiceState == EventServiceState.closed || + (config?.community.closed ?? false); final offboardPlugin = context.select( (WalletState state) => state.config!.getOffboardPlugin(), ); final cleaningUp = context.select((WalletState state) => state.cleaningUp); - final config = context.select((WalletState state) => state.config); final hasActiveSessions = context.select((WalletConnectState state) => state.hasActiveSessions); @@ -1401,19 +1449,19 @@ class WalletScreenState extends State ), ), ), - if (isCommunityClosed) - CommunityClosedBanner( - handleOffboardPlugin: offboardPlugin != null - ? () => handlePlugin(offboardPlugin) - : null, - onDismiss: () { - setState(() { - _isClosedBannerDismissed = true; - }); - }, - display: isCommunityClosed, - offboardPlugin: offboardPlugin, - ), + CommunityClosedBanner( + key: ValueKey('community_closed_banner_$_bannerResetKey'), + handleOffboardPlugin: offboardPlugin != null + ? () => handlePlugin(offboardPlugin) + : null, + onDismiss: () { + setState(() { + _isClosedBannerDismissed = true; + }); + }, + display: isCommunityClosed && !_isClosedBannerDismissed, + offboardPlugin: offboardPlugin, + ), OfflineBanner( communityUrl: config?.community.url ?? '', display: isOffline, From 719a89e78186cdd7bbd7c65cb3a8f365183e24a4 Mon Sep 17 00:00:00 2001 From: sajee_techi Date: Fri, 23 Jan 2026 17:42:06 +0530 Subject: [PATCH 4/4] commuity closed banner - display/hide from app resume from background --- lib/screens/wallet/screen.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/screens/wallet/screen.dart b/lib/screens/wallet/screen.dart index 4e6c5c94..6fb4bbef 100644 --- a/lib/screens/wallet/screen.dart +++ b/lib/screens/wallet/screen.dart @@ -153,6 +153,20 @@ class WalletScreenState extends State } } + @override + Future didChangeAppLifecycleState(AppLifecycleState state) async { + switch (state) { + case AppLifecycleState.resumed: + _logic.updateWalletConfigFromRemote(); + setState(() { + _isClosedBannerDismissed = false; + _bannerResetKey++; + }); + break; + default: + } + } + void onScrollUpdate() { if (_scrollController.position.pixels >= _scrollController.position.maxScrollExtent - 300) {