wrap HistoryTopBar in Observer
What changed, and why it matters
This commit is a routine Flutter UI fix. It wraps a top bar widget in an 'Observer' so the interface automatically updates when the underlying app state changes. There is no security relevance visible in the change.
No security action needed; treat as a normal UI/reactivity fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch imports flutter_mobx and wraps a HistoryTopBar widget in an Observer builder. This is a standard MobX pattern to make the widget reactively rebuild when observable state (dashboardViewModel.itemsShort) changes. No security-sensitive code, input handling, cryptography, networking, or permissions are modified.
Changed components
lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dartInspect captured patch +6 / −3
diff --git a/lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dart b/lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dart
index c3f699d5..8d5dfce0 100644
--- a/lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dart
+++ b/lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dart
@@ -9,6 +9,7 @@ import 'package:cake_wallet/src/screens/dashboard/pages/nft_listing_page.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cake_wallet/view_model/dashboard/nft_view_model.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'assets_section.dart';
@@ -107,9 +108,11 @@ class _AssetsHistorySectionState extends State<AssetsHistorySection> {
selectedTab: _selectedTab,
),
if (tabs.length == 1)
- HistoryTopBar(
- onTap: () => openHistoryModal(context),
- roundedBottom: widget.dashboardViewModel.itemsShort.isEmpty,
+ Observer(
+ builder:(_)=> HistoryTopBar(
+ onTap: () => openHistoryModal(context),
+ roundedBottom: widget.dashboardViewModel.itemsShort.isEmpty,
+ ),
),
tabs[_selectedTab].content
],
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.