Compare commits
No commits in common. "d5c2dc0ee0e68fdbd6ae0ef90a95ac66c7a2eb2b" and "20b426935837a70f7b6144fa7eea3180ae0d4920" have entirely different histories.
d5c2dc0ee0
...
20b4269358
@ -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
|
||||
}
|
||||
|
||||
@ -42,6 +42,3 @@ 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."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user