What changed, and why it matters
This commit fixes a programming crash in the Stack Wallet app's checkout screen. In some countries, the app was forcing a 'State' field to be shown even when no state was selected, which could cause the app to crash with a null error. The fix hides the state field when it isn't needed and only forces it when it is required.
Treat as a routine stability fix. No immediate security response is indicated. If this screen handles payment or personal data, ensure the broader checkout flow has separate security review, but this specific change does not alter that risk posture.
Security signals we found
Null-dereference crash fix in UI rendering path
No input validation, authentication, cryptography, or network changes observed
No memory-unsafe code or platform-native interfaces involved
No references to security advisories, CVEs, or researcher attribution in commit
Evidence from the diff
The patch addresses a null-safety violation in lib/pages/shopinbit/shopinbit_shipping_view.dart. Previously, the UI unconditionally rendered a DetailItem for ‘State’ using _selectedState!, which would throw if _selectedState was null. The fix guards that widget behind if (_requiresState). In the billing section, the existing _requiresState guard is preserved and the detail argument is changed from _selectedState to _selectedState!, matching the assumption that the value is non-null when required. This is a straightforward UI crash fix with no clear security boundary being crossed.
Changed components
lib/pages/shopinbit/shopinbit_shipping_view.dartShopInBit shipping/billing detail display UIInspect captured patch +3 / −3
diff --git a/lib/pages/shopinbit/shopinbit_shipping_view.dart b/lib/pages/shopinbit/shopinbit_shipping_view.dart
index ed15da3..306b853 100644
--- a/lib/pages/shopinbit/shopinbit_shipping_view.dart
+++ b/lib/pages/shopinbit/shopinbit_shipping_view.dart
@@ -368,8 +368,8 @@ class _ShopInBitShippingViewState extends ConsumerState<ShopInBitShippingView> {
),
],
),
- spacing,
- DetailItem(title: "State", detail: _selectedState!),
+ if (_requiresState) spacing,
+ if (_requiresState) DetailItem(title: "State", detail: _selectedState!),
spacing,
DetailItem(title: "Country", detail: _deliveryCountryLabel),
spacing,
@@ -482,7 +482,7 @@ class _ShopInBitShippingViewState extends ConsumerState<ShopInBitShippingView> {
spacing,
if (_requiresState) ...[
- DetailItem(title: "Billing state", detail: _selectedState),
+ DetailItem(title: "Billing state", detail: _selectedState!),
spacing,
DetailItem(title: "Billing country", detail: _deliveryCountryLabel),
],
Why this scored 21/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.