Skip to content

Commit ed3ebb7

Browse files
committed
[AccountManagePage] hide 0 balances
1 parent 966fea4 commit ed3ebb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/lib/page/profile/account/account_manage_page.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,17 @@ class _AccountManagePageState extends State<AccountManagePage> {
104104

105105
final community = _appStore.encointer.communityStores?[cidFmt];
106106

107-
if (community == null) {
107+
if (community == null || community.applyDemurrage == null) {
108108
// Never happened, but we want to be defensive here to prevent a red screen.
109109
Log.e('[AccountManagePage] Communities is null, even though we have a balance entry for it. Fatal app error.');
110110
return Container();
111111
}
112112

113+
if ((community.applyDemurrage!(entry) ?? 0) <= 0.0001) {
114+
Log.p("[AccountManagePage] Don't display community with 0 balance");
115+
return Container();
116+
}
117+
113118
final isBootstrapper = _appStore.encointer.community!.bootstrappers != null &&
114119
_appStore.encointer.community!.bootstrappers!.contains(address);
115120

0 commit comments

Comments
 (0)