added logging
This commit is contained in:
parent
ea3a6d8382
commit
b31a68ad8e
@ -2605,6 +2605,7 @@ func (h *MenuHandlers) RequestCustomAlias(ctx context.Context, sym string, input
|
|||||||
// Check if an alias already exists
|
// Check if an alias already exists
|
||||||
existingAlias, err := store.ReadEntry(ctx, sessionId, storedb.DATA_ACCOUNT_ALIAS)
|
existingAlias, err := store.ReadEntry(ctx, sessionId, storedb.DATA_ACCOUNT_ALIAS)
|
||||||
if err == nil && len(existingAlias) > 0 {
|
if err == nil && len(existingAlias) > 0 {
|
||||||
|
logg.InfoCtxf(ctx, "Current alias", "alias", string(existingAlias))
|
||||||
// Update existing alias
|
// Update existing alias
|
||||||
aliasResult, err := h.accountService.UpdateAlias(ctx, sanitizedInput, string(pubKey))
|
aliasResult, err := h.accountService.UpdateAlias(ctx, sanitizedInput, string(pubKey))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -2615,6 +2616,7 @@ func (h *MenuHandlers) RequestCustomAlias(ctx context.Context, sym string, input
|
|||||||
alias := aliasResult.Alias
|
alias := aliasResult.Alias
|
||||||
logg.InfoCtxf(ctx, "Updated alias", "alias", alias)
|
logg.InfoCtxf(ctx, "Updated alias", "alias", alias)
|
||||||
} else {
|
} else {
|
||||||
|
logg.InfoCtxf(ctx, "Registering a new alias", "err", err)
|
||||||
// Register a new alias
|
// Register a new alias
|
||||||
aliasResult, err := h.accountService.RequestAlias(ctx, string(pubKey), sanitizedInput)
|
aliasResult, err := h.accountService.RequestAlias(ctx, string(pubKey), sanitizedInput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user