diff --git a/lib/features/settings/subfeatures/chain_configuration/subfeatures/add_custom_network/add_custom_network_page.dart b/lib/features/settings/subfeatures/chain_configuration/subfeatures/add_custom_network/add_custom_network_page.dart index aa7799b2..7f158251 100644 --- a/lib/features/settings/subfeatures/chain_configuration/subfeatures/add_custom_network/add_custom_network_page.dart +++ b/lib/features/settings/subfeatures/chain_configuration/subfeatures/add_custom_network/add_custom_network_page.dart @@ -105,8 +105,7 @@ class AddCustomNetworkPage extends HookConsumerWidget { MxcTextField( key: const ValueKey('symbolTextField'), label: translate('symbol'), - hint: - '${translate('currency')} ${translate('symbol')}', + hint: '${translate('currency')} ${translate('symbol')}', controller: presenter.symbolController, action: TextInputAction.next, validator: (value) { @@ -125,10 +124,22 @@ class AddCustomNetworkPage extends HookConsumerWidget { MxcTextField( key: const ValueKey('explorerTextField'), label: translate('block_explorer_url'), - hint: - '${translate('block_explorer_url')} (${translate('optional')})', + hint: translate('block_explorer_url'), controller: presenter.explorerController, action: TextInputAction.done, + validator: (value) { + final res = Validation.notEmpty( + context, + value, + translate('x_not_empty').replaceFirst( + '{0}', translate('block_explorer_url'))); + if (res != null) return res; + return Validation.checkHttps(context, value); + }, + onChanged: (value) { + presenter.changeAbleToSave( + formKey.currentState!.validate() ? true : false); + }, ), ], ), diff --git a/packages/shared b/packages/shared index 78bb0928..79da7ed1 160000 --- a/packages/shared +++ b/packages/shared @@ -1 +1 @@ -Subproject commit 78bb09288299de8f9f9bcda5d863bc641304d328 +Subproject commit 79da7ed13f0077c981cf8c4faeced34c7e140e29