set a default content of 0 if rates are not found for the selected voucher

This commit is contained in:
Alfred Kamanda 2026-02-20 09:34:58 +03:00
parent 320d10890c
commit 3108cb2f22
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -149,6 +149,7 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [
_, maxRAT, err := h.calculateSendCreditLimits(ctx, activePoolAddress, []byte(metadata.TokenAddress), recipientActiveAddress, publicKey, []byte(metadata.TokenDecimals), recipientActiveDecimal)
if err != nil {
res.FlagSet = append(res.FlagSet, flag_api_call_error)
res.Content = "0"
logg.ErrorCtxf(ctx, "failed on calculateSendCreditLimits", "error", err)
return res, nil
}