diff --git a/handlers/application/mpesa.go b/handlers/application/mpesa.go index a497d65..b37e9c3 100644 --- a/handlers/application/mpesa.go +++ b/handlers/application/mpesa.go @@ -123,6 +123,8 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [ maxKshFormatted, ) + res.FlagReset = append(res.FlagReset, flag_low_swap_amount, flag_api_call_error, flag_incorrect_voucher, flag_incorrect_pool) + return res, nil } @@ -155,6 +157,8 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [ return res, nil } + res.FlagReset = append(res.FlagReset, flag_api_call_error) + // Fallback if below minimum maxFloat, _ := strconv.ParseFloat(maxRAT, 64) if maxFloat < 0.1 { @@ -164,6 +168,8 @@ func (h *MenuHandlers) GetMpesaMaxLimit(ctx context.Context, sym string, input [ return res, nil } + res.FlagReset = append(res.FlagReset, flag_low_swap_amount) + // Save max RAT amount to be used in validating the user's input err = userStore.WriteEntry(ctx, sessionId, storedb.DATA_ACTIVE_SWAP_MAX_AMOUNT, []byte(maxRAT)) if err != nil {