diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dart index b00960aab..0f16a3cd0 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dart @@ -71,12 +71,14 @@ class _DesktopTokenSendState extends ConsumerState { late TextEditingController sendToController; late TextEditingController cryptoAmountController; late TextEditingController baseAmountController; + late TextEditingController nonceController; late final SendViewAutoFillData? _data; final _addressFocusNode = FocusNode(); final _cryptoFocus = FocusNode(); final _baseFocus = FocusNode(); + final _nonceFocusNode = FocusNode(); String? _note; @@ -229,6 +231,7 @@ class _DesktopTokenSendState extends ConsumerState { amount: amount, args: { "feeRate": ref.read(feeRateTypeStateProvider), + "nonce": int.tryParse(nonceController.text), }, ); @@ -585,6 +588,7 @@ class _DesktopTokenSendState extends ConsumerState { sendToController = TextEditingController(); cryptoAmountController = TextEditingController(); baseAmountController = TextEditingController(); + nonceController = TextEditingController(); // feeController = TextEditingController(); onCryptoAmountChanged = _cryptoAmountChanged; @@ -629,11 +633,13 @@ class _DesktopTokenSendState extends ConsumerState { sendToController.dispose(); cryptoAmountController.dispose(); baseAmountController.dispose(); + nonceController.dispose(); // feeController.dispose(); _addressFocusNode.dispose(); _cryptoFocus.dispose(); _baseFocus.dispose(); + _nonceFocusNode.dispose(); super.dispose(); } @@ -1002,6 +1008,56 @@ class _DesktopTokenSendState extends ConsumerState { DesktopFeeDropDown( walletId: walletId, ), + const SizedBox( + height: 20, + ), + Text( + "Nonce", + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context) + .extension()! + .textFieldActiveSearchIconRight, + ), + textAlign: TextAlign.left, + ), + const SizedBox( + height: 10, + ), + ClipRRect( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + child: TextField( + minLines: 1, + maxLines: 1, + key: const Key("sendViewNonceFieldKey"), + controller: nonceController, + readOnly: false, + autocorrect: false, + enableSuggestions: false, + keyboardType: const TextInputType.numberWithOptions(), + focusNode: _nonceFocusNode, + style: STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context) + .extension()! + .textFieldActiveText, + height: 1.8, + ), + decoration: standardInputDecoration( + "Leave empty to auto select nonce", + _nonceFocusNode, + context, + desktopMed: true, + ).copyWith( + contentPadding: const EdgeInsets.only( + left: 16, + top: 11, + bottom: 12, + right: 5, + ), + ), + ), + ), const SizedBox( height: 36, ),