mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
fix: allow address only edits (#2233)
This commit is contained in:
parent
2a6dad2257
commit
cb257e1391
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,11 @@ abstract class ContactViewModelBase with Store {
|
|||
state = IsExecutingState();
|
||||
final now = DateTime.now();
|
||||
|
||||
if (doesContactNameExist(name)) {
|
||||
final nameExists = _contact == null
|
||||
? doesContactNameExist(name)
|
||||
: doesContactNameExist(name) && _contact.original.name != name;
|
||||
|
||||
if (nameExists) {
|
||||
state = FailureState(S.current.contact_name_exists);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue