chore_: add log data to paraswap requests

This commit is contained in:
Dario Gabriel Lipicar 2024-10-23 12:40:35 -03:00
parent 635f19e3c7
commit bdf80c6c39
No known key found for this signature in database
GPG Key ID: 9625E9494309D203
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
walletCommon "github.com/status-im/status-go/services/wallet/common"
)
@ -56,10 +57,15 @@ func (c *ClientV5) BuildTransaction(ctx context.Context, srcTokenAddress common.
}
url := fmt.Sprintf(transactionsURL, c.chainID)
log.Info("BuildTransaction", "url", url)
log.Info("BuildTransaction", "params", params)
log.Info("BuildTransaction", "priceRoute", string(priceRoute))
response, err := c.httpClient.DoPostRequest(ctx, url, params, nil)
if err != nil {
return Transaction{}, err
}
log.Info("BuildTransaction", "response", string(response))
tx, err := handleBuildTransactionResponse(response)
if err != nil {

View File

@ -9,6 +9,7 @@ import (
"strconv"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/status-im/status-go/services/wallet/bigint"
)
@ -53,10 +54,13 @@ func (c *ClientV5) FetchPriceRoute(ctx context.Context, srcTokenAddress common.A
params.Add("version", "6.2")
url := pricesURL
log.Info("FetchPriceRoute", "url", url)
log.Info("FetchPriceRoute", "params", params)
response, err := c.httpClient.DoGetRequest(ctx, url, params, nil)
if err != nil {
return Route{}, err
}
log.Info("FetchPriceRoute", "response", string(response))
return handlePriceRouteResponse(response)
}