Compare commits

..

2 Commits

Author SHA1 Message Date
0d4be0f7fc
return nil when error is key not found 2025-01-24 10:12:28 +03:00
b6161da749
fix failing test 2025-01-24 09:32:21 +03:00
2 changed files with 10 additions and 1 deletions

View File

@ -2268,14 +2268,23 @@ func (h *MenuHandlers) constructAccountAlias(ctx context.Context) error {
}
firstName, err := store.ReadEntry(ctx, sessionId, storedb.DATA_FIRST_NAME)
if err != nil {
if db.IsNotFound(err) {
return nil
}
return err
}
familyName, err := store.ReadEntry(ctx, sessionId, storedb.DATA_FAMILY_NAME)
if err != nil {
if db.IsNotFound(err) {
return nil
}
return err
}
pubKey, err := store.ReadEntry(ctx, sessionId, storedb.DATA_PUBLIC_KEY)
if err != nil {
if db.IsNotFound(err) {
return nil
}
return err
}
aliasInput := fmt.Sprintf("%s%s", firstName, familyName)

View File

@ -1679,7 +1679,7 @@ func TestValidateRecipient(t *testing.T) {
},
{
name: "Test with alias recepient",
input: []byte("alias123"),
input: []byte("alias123.sarafu.local"),
expectedResult: resource.Result{},
},
}