Compare commits

..

No commits in common. "d5c2dc0ee0e68fdbd6ae0ef90a95ac66c7a2eb2b" and "20b426935837a70f7b6144fa7eea3180ae0d4920" have entirely different histories.

2 changed files with 2 additions and 17 deletions

View File

@ -2,7 +2,6 @@ package application
import (
"context"
"errors"
"fmt"
"strconv"
"strings"
@ -358,20 +357,9 @@ func (h *MenuHandlers) InitiateTransaction(ctx context.Context, sym string, inpu
// Call TokenTransfer
r, err := h.accountService.TokenTransfer(ctx, finalAmountStr, data.PublicKey, data.Recipient, data.ActiveAddress)
if err != nil {
var apiErr *APIError
if errors.As(err, &apiErr) {
switch apiErr.Code {
case "E10":
res.Content = l.Get("Only USD vouchers are allowed to mpesa.sarafu.eth.")
default:
res.Content = l.Get("Your request failed. Please try again later.")
}
} else {
res.Content = l.Get("An unexpected error occurred. Please try again later.")
}
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
res.FlagSet = append(res.FlagSet, flag_api_error)
res.Content = l.Get("Your request failed. Please try again later.")
logg.ErrorCtxf(ctx, "failed on TokenTransfer", "error", err)
return res, nil
}

View File

@ -41,7 +41,4 @@ msgid "%s is not in %s. Please update your voucher and try again."
msgstr "%s haipo kwenye %s. Tafadhali badilisha sarafu yako na ujaribu tena."
msgid "Name: %s\nSymbol: %s"
msgstr "Jina: %s\nSarafu: %s"
msgid "Only USD vouchers are allowed to mpesa.sarafu.eth."
msgstr "Ni sarafu za USD pekee zinazoruhusiwa kwa mpesa.sarafu.eth."
msgstr "Jina: %s\nSarafu: %s"