fix: show token ticker in DesktopAuthSend prompt
What changed, and why it matters
This commit fixes a small user-interface label bug on the desktop send confirmation screen. Previously, when sending a token (for example, an Ethereum ERC-20 token), the prompt incorrectly showed the parent coin's ticker (e.g., ETH) instead of the token's own ticker (e.g., USDT). The change lets the screen receive and display the correct token ticker. It is a cosmetic fix, not a security fix.
No security action needed. Treat as a routine UI fix.
Security signals we found
UI label correction only
No change to transaction construction, signing, or validation
No change to password handling or authentication flow
No change to state management or wallet logic
Evidence from the diff
The DesktopAuthSend widget now accepts an optional tokenTicker parameter and uses widget.tokenTicker?.toUpperCase() ?? widget.coin.ticker.toUpperCase() in the password confirmation prompt. This ensures token sends display the token ticker rather than the base chain coin ticker. The rest of the diff is formatting/refactoring (trailing commas, whitespace, inline constructors). No logic affecting balances, transaction construction, signing, validation, or authentication was changed.
Changed components
lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dartInspect captured patch +49 / −82
diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart
index c38b33a..242e71e 100644
--- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart
+++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart
@@ -26,12 +26,10 @@ import '../../../../widgets/loading_indicator.dart';
import '../../../../widgets/stack_text_field.dart';
class DesktopAuthSend extends ConsumerStatefulWidget {
- const DesktopAuthSend({
- super.key,
- required this.coin,
- });
+ const DesktopAuthSend({super.key, required this.coin, this.tokenTicker});
final CryptoCurrency coin;
+ final String? tokenTicker;
@override
ConsumerState<DesktopAuthSend> createState() => _DesktopAuthSendState();
@@ -59,12 +57,7 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
builder: (context) => const Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- LoadingIndicator(
- width: 200,
- height: 200,
- ),
- ],
+ children: [LoadingIndicator(width: 200, height: 200)],
),
),
);
@@ -77,15 +70,8 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
if (mounted) {
Navigator.of(context).pop();
- Navigator.of(
- context,
- rootNavigator: true,
- ).pop(passwordIsValid);
- await Future<void>.delayed(
- const Duration(
- milliseconds: 100,
- ),
- );
+ Navigator.of(context, rootNavigator: true).pop(passwordIsValid);
+ await Future<void>.delayed(const Duration(milliseconds: 100));
}
} finally {
_lock = false;
@@ -113,29 +99,17 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
- SvgPicture.asset(
- Assets.svg.keys,
- width: 100,
- ),
- const SizedBox(
- height: 56,
- ),
+ SvgPicture.asset(Assets.svg.keys, width: 100),
+ const SizedBox(height: 56),
+ Text("Confirm transaction", style: STextStyles.desktopH3(context)),
+ const SizedBox(height: 16),
Text(
- "Confirm transaction",
- style: STextStyles.desktopH3(context),
- ),
- const SizedBox(
- height: 16,
- ),
- Text(
- "Enter your wallet password to send ${widget.coin.ticker.toUpperCase()}",
+ "Enter your wallet password to send ${widget.tokenTicker?.toUpperCase() ?? widget.coin.ticker.toUpperCase()}",
style: STextStyles.desktopTextMedium(context).copyWith(
color: Theme.of(context).extension<StackColors>()!.textDark3,
),
),
- const SizedBox(
- height: 24,
- ),
+ const SizedBox(height: 24),
ClipRRect(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
@@ -144,9 +118,7 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
key: const Key("desktopLoginPasswordFieldKey"),
focusNode: passwordFocusNode,
controller: passwordController,
- style: STextStyles.desktopTextMedium(context).copyWith(
- height: 2,
- ),
+ style: STextStyles.desktopTextMedium(context).copyWith(height: 2),
obscureText: hidePassword,
enableSuggestions: false,
autocorrect: false,
@@ -156,45 +128,44 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
_confirmPressed();
}
},
- decoration: standardInputDecoration(
- "Enter password",
- passwordFocusNode,
- context,
- ).copyWith(
- suffixIcon: UnconstrainedBox(
- child: SizedBox(
- height: 70,
- child: Row(
- children: [
- const SizedBox(
- width: 24,
- ),
- GestureDetector(
- key: const Key(
- "restoreFromFilePasswordFieldShowPasswordButtonKey",
- ),
- onTap: () async {
- setState(() {
- hidePassword = !hidePassword;
- });
- },
- child: SvgPicture.asset(
- hidePassword ? Assets.svg.eye : Assets.svg.eyeSlash,
- color: Theme.of(context)
- .extension<StackColors>()!
- .textDark3,
- width: 24,
- height: 24,
- ),
+ decoration:
+ standardInputDecoration(
+ "Enter password",
+ passwordFocusNode,
+ context,
+ ).copyWith(
+ suffixIcon: UnconstrainedBox(
+ child: SizedBox(
+ height: 70,
+ child: Row(
+ children: [
+ const SizedBox(width: 24),
+ GestureDetector(
+ key: const Key(
+ "restoreFromFilePasswordFieldShowPasswordButtonKey",
+ ),
+ onTap: () async {
+ setState(() {
+ hidePassword = !hidePassword;
+ });
+ },
+ child: SvgPicture.asset(
+ hidePassword
+ ? Assets.svg.eye
+ : Assets.svg.eyeSlash,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark3,
+ width: 24,
+ height: 24,
+ ),
+ ),
+ const SizedBox(width: 12),
+ ],
),
- const SizedBox(
- width: 12,
- ),
- ],
+ ),
),
),
- ),
- ),
onChanged: (newValue) {
setState(() {
_confirmEnabled = passwordController.text.isNotEmpty;
@@ -202,9 +173,7 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
},
),
),
- const SizedBox(
- height: 48,
- ),
+ const SizedBox(height: 48),
Row(
children: [
Expanded(
@@ -214,9 +183,7 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
onPressed: Navigator.of(context).pop,
),
),
- const SizedBox(
- width: 16,
- ),
+ const SizedBox(width: 16),
Expanded(
child: PrimaryButton(
enabled: _confirmEnabled,
Why this scored 17/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.