dolar from gitea

This commit is contained in:
maximo tejeda 2024-12-02 15:24:35 -04:00
parent 1113c9a597
commit 3f5366770d

View File

@ -3,13 +3,13 @@ package dolar
import (
"context"
"github.com/maximotejeda/dolar/proto/golang/dolar"
dl "github.com/maximotejeda/dolar/proto/golang/dolar"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"google.golang.org/grpc"
)
type Adapter struct {
dolar dolar.DollarClient
dolar dl.DollarClient
conn *grpc.ClientConn
}
@ -20,8 +20,8 @@ func NewAdapter(conn *grpc.ClientConn) (*Adapter, error) {
func (a *Adapter) NewHistory(history *domain.History) error {
_, err := a.dolar.NewHistory(context.Background(),
&dolar.AddDolarRequest{
Institution: &dolar.History{
&dl.AddDolarRequest{
Institution: &dl.History{
Name: history.Name,
Compra: float32(history.Compra),
Venta: float32(history.Venta),