The current identity_from_passphrase function handles both retrieving an existing identity and creating one if it doesn’t exist.
To improve clarity and separation of concerns, we should split it into two distinct functions:
retrieve_identity: to retrieve an existing identity.
create_identity: to create a new identity.
The current
identity_from_passphrasefunction handles both retrieving an existing identity and creating one if it doesn’t exist.To improve clarity and separation of concerns, we should split it into two distinct functions:
retrieve_identity: to retrieve an existing identity.create_identity: to create a new identity.