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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user