diff --git a/lib/ui/views/add_account/bloc/provider.dart b/lib/ui/views/add_account/bloc/provider.dart index 346153b07..b503d8457 100644 --- a/lib/ui/views/add_account/bloc/provider.dart +++ b/lib/ui/views/add_account/bloc/provider.dart @@ -49,7 +49,7 @@ class AddAccountFormNotifier extends AutoDisposeNotifier { String name, ) async { state = state.copyWith( - name: name.trimLeft().trimRight(), + name: name, ); return; } diff --git a/lib/ui/views/contacts/bloc/provider.dart b/lib/ui/views/contacts/bloc/provider.dart index 864caa93a..5562d59ab 100644 --- a/lib/ui/views/contacts/bloc/provider.dart +++ b/lib/ui/views/contacts/bloc/provider.dart @@ -38,7 +38,7 @@ class ContactCreationFormNotifier ); void setName(String name, BuildContext context) { - state = state.copyWith(name: name.trimLeft().trimRight(), error: ''); + state = state.copyWith(name: name, error: ''); } void setAddress(String address, BuildContext context) { diff --git a/lib/ui/views/nft_creation/bloc/provider.dart b/lib/ui/views/nft_creation/bloc/provider.dart index 59eba53d9..8cbec9c50 100644 --- a/lib/ui/views/nft_creation/bloc/provider.dart +++ b/lib/ui/views/nft_creation/bloc/provider.dart @@ -394,13 +394,12 @@ class NftCreationFormNotifier final propertiesToSet = [...state.properties] ..removeWhere( (element) => - element.propertyName.trimLeft().trimRight().toUpperCase() == - propertyName.trimLeft().trimRight().toUpperCase(), + element.propertyName.toUpperCase() == propertyName.toUpperCase(), ) ..add( NftCreationFormStateProperty( - propertyName: propertyName.trimLeft().trimRight(), - propertyValue: propertyValue.trimLeft().trimRight(), + propertyName: propertyName, + propertyValue: propertyValue, ), ) ..sort((a, b) => a.propertyName.compareTo(b.propertyName)); @@ -420,12 +419,12 @@ class NftCreationFormNotifier return; } - state = state.copyWith(name: name.trimLeft().trimRight(), error: ''); - setProperty('name', name.trimLeft().trimRight()); + state = state.copyWith(name: name, error: ''); + setProperty('name', name); } void setSymbol(String symbol) { - state = state.copyWith(symbol: symbol.trimLeft().trimRight(), error: ''); + state = state.copyWith(symbol: symbol, error: ''); } void setInitialSupply(int initialSupply) { @@ -433,13 +432,13 @@ class NftCreationFormNotifier } void setDescription(String description) { - state = state.copyWith(description: description.trimLeft().trimRight()); - setProperty('description', description.trimLeft().trimRight()); + state = state.copyWith(description: description); + setProperty('description', description); } void setPropertyName(String propertyName) { state = state.copyWith( - propertyName: propertyName.trimLeft().trimRight(), + propertyName: propertyName, error: '', ); } @@ -452,7 +451,7 @@ class NftCreationFormNotifier void setPropertyValue(String propertyValue) { state = state.copyWith( - propertyValue: propertyValue.trimLeft().trimRight(), + propertyValue: propertyValue, error: '', ); } diff --git a/lib/ui/views/tokens_fungibles/bloc/provider.dart b/lib/ui/views/tokens_fungibles/bloc/provider.dart index c5651842b..3f0af40a9 100644 --- a/lib/ui/views/tokens_fungibles/bloc/provider.dart +++ b/lib/ui/views/tokens_fungibles/bloc/provider.dart @@ -149,8 +149,7 @@ class AddTokenFormNotifier extends AutoDisposeNotifier { return; } - if (kTokenFordiddenName - .contains(name.trimLeft().trimRight().toUpperCase())) { + if (kTokenFordiddenName.contains(name.toUpperCase())) { state = state.copyWith( errorNameText: AppLocalizations.of(context)!.tokenNameUCO, ); @@ -158,7 +157,7 @@ class AddTokenFormNotifier extends AutoDisposeNotifier { } state = state.copyWith( - name: name.trimLeft().trimRight(), + name: name, ); _updateFees( context, @@ -202,8 +201,7 @@ class AddTokenFormNotifier extends AutoDisposeNotifier { return; } - if (kTokenFordiddenName - .contains(symbol.trimLeft().trimRight().toUpperCase())) { + if (kTokenFordiddenName.contains(symbol.toUpperCase())) { state = state.copyWith( errorSymbolText: AppLocalizations.of(context)!.tokenSymbolUCO, ); @@ -211,7 +209,7 @@ class AddTokenFormNotifier extends AutoDisposeNotifier { } state = state.copyWith( - symbol: symbol.trimLeft().trimRight(), + symbol: symbol, ); _updateFees( context,