fix: show actual currency symbol in set rate confirmation

processRateInput was passing empty string to CurrencySymbol, causing
it to default to '$' instead of the user's configured currency.
This commit is contained in:
2026-06-29 10:07:12 +03:30
parent 6f7f5878bf
commit 2c1c149b13

View File

@@ -562,8 +562,13 @@ func (h *Handler) processRateInput(ctx context.Context, msg *models.Message, use
}
h.saveRate(ctx, msg.Chat.ID, user, rate)
backKB := settingsBackKeyboard()
st, _ := h.Repo.GetOrCreateSettings(user.ID)
sym := "$"
if st != nil && st.Currency != "" {
sym = domain.CurrencySymbol(st.Currency)
}
h.editText(ctx, msg.Chat.ID, pi.MsgID,
fmt.Sprintf("Hourly rate set to %s%.2f", domain.CurrencySymbol(""), rate), &backKB)
fmt.Sprintf("Hourly rate set to %s%.2f", sym, rate), &backKB)
}
func (h *Handler) processCurrencyInput(ctx context.Context, msg *models.Message, user *domain.User, pi *PendingInput, text string) {