chore_: add log data to paraswap requests
This commit is contained in:
parent
635f19e3c7
commit
bdf80c6c39
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue