fix(shopinbit): await clipboard write in car-research copy address
What changed, and why it matters
This is a small UI reliability fix in a cryptocurrency wallet's car-research payment screen. The developer made the 'copy address to clipboard' function wait for the clipboard write to complete before showing a confirmation message, and added a check to avoid using a screen that may have been closed during the operation. It is a routine correctness improvement, not a security fix for an exploitable vulnerability.
No security action required. Treat as a normal bug-fix/UI-hardening commit. If auditing, verify that other async clipboard usages in the codebase also guard context.mounted, but this is a code-quality matter rather than a vulnerability.
Security signals we found
No security keywords in commit title or message
Change is a UI lifecycle/Flutter correctness fix
No input validation, cryptography, or permission changes
No references to CVEs, advisories, or researchers
Evidence from the diff
The change converts _copyAddress from a synchronous void method to an async Future
Changed components
lib/pages/shopinbit/shopinbit_car_research_payment_view.dart_copyAddress methodShopInBit car research payment viewInspect captured patch +3 / −2
diff --git a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
index 3415f32..8c523e2 100644
--- a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
@@ -448,10 +448,11 @@ class _ShopInBitCarResearchPaymentViewState
);
}
- void _copyAddress(BuildContext context) {
+ Future<void> _copyAddress(BuildContext context) async {
final addr = _currentAddress;
if (addr.isEmpty) return;
- Clipboard.setData(ClipboardData(text: addr));
+ await Clipboard.setData(ClipboardData(text: addr));
+ if (!context.mounted) return;
unawaited(
showFloatingFlushBar(
type: FlushBarType.info,
Why this scored 16/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.