Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
feat: Made explorer url compulsory
Browse files Browse the repository at this point in the history
  • Loading branch information
reasje committed Sep 22, 2023
1 parent 1faf8f2 commit b37692d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
},
),
],
),
Expand Down

0 comments on commit b37692d

Please sign in to comment.