fix(user): Fixed Key format generation logic if 1 address 0 keys (Key Migration Phase 2).

This commit is contained in:
Neil Marietta
2022-12-23 13:25:14 +01:00
parent 44d881fe06
commit 215a57747c
@@ -42,7 +42,7 @@ fun List<UserAddress>.firstInternalOrNull() = filterInternal().firstOrNull()
/**
* @return true if migrated/new key format must be generated, false otherwise.
*/
fun List<UserAddress>.generateNewKeyFormat() = isEmpty() || hasMigratedKey()
fun List<UserAddress>.generateNewKeyFormat() = all { it.keys.isEmpty() } || hasMigratedKey()
/**
* @return true if at least one [UserAddress] is migrated into the new key format, false otherwise.