Fixed default gateway for bff

This commit is contained in:
Stephan D
2026-02-04 13:44:20 +01:00
parent afa842ba65
commit f56a3d4611
30 changed files with 66 additions and 66 deletions

View File

@@ -7,7 +7,7 @@ import (
"strings"
"time"
chaingatewayclient "github.com/tech/sendico/gateway/chain/client"
trongatewayclient "github.com/tech/sendico/gateway/tron/client"
api "github.com/tech/sendico/pkg/api/http"
"github.com/tech/sendico/pkg/auth"
"github.com/tech/sendico/pkg/db/account"
@@ -169,14 +169,14 @@ func (a *AccountAPI) initChainGateway(cfg *eapi.ChainGatewayConfig) error {
return merrors.InvalidArgument(fmt.Sprintf("chain gateway address is not specified and address env %s is empty", cfg.AddressEnv))
}
clientCfg := chaingatewayclient.Config{
clientCfg := trongatewayclient.Config{
Address: cfg.Address,
DialTimeout: time.Duration(cfg.DialTimeoutSeconds) * time.Second,
CallTimeout: time.Duration(cfg.CallTimeoutSeconds) * time.Second,
Insecure: cfg.Insecure,
}
client, err := chaingatewayclient.New(context.Background(), clientCfg)
client, err := trongatewayclient.New(context.Background(), clientCfg)
if err != nil {
return err
}

View File

@@ -93,10 +93,10 @@ func (a *AccountAPI) signup(r *http.Request) http.HandlerFunc {
if err := a.executeSignupTransaction(r.Context(), &sr, newAccount); err != nil {
if errors.Is(err, merrors.ErrDataConflict) {
a.logger.Info("Failed to register account", zap.Error(err), zap.String("login", newAccount.Login))
a.logger.Warn("Failed to register account", zap.Error(err), zap.String("login", newAccount.Login))
return response.DataConflict(a.logger, "user_already_registered", "User has already been registered")
}
a.logger.Info("Failed to create new user", zap.Error(err), zap.String("login", newAccount.Login))
a.logger.Warn("Failed to create new user", zap.Error(err), zap.String("login", newAccount.Login))
return response.Internal(a.logger, a.Name(), err)
}