Skip to content

Commit

Permalink
ToQuery -> Query
Browse files Browse the repository at this point in the history
  • Loading branch information
decanus committed Feb 16, 2024
1 parent 83e7b44 commit 55d7aeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c *Client) Route(params RouteRequestParameters) (*RouteResponse, error) {
return nil, errors.New("slippage must be > 0 and < 99.99")
}

resp, err := c.cli.Get("https://api.0xsquid.com/v1/route?" + params.ToQuery().Encode())
resp, err := c.cli.Get("https://api.0xsquid.com/v1/route?" + params.Query().Encode())
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type RouteRequestParameters struct {
ReceiveGasOnDestination bool
}

func (p RouteRequestParameters) ToQuery() url.Values {
func (p RouteRequestParameters) Query() url.Values {
query := url.Values{}
query.Add("fromChain", p.FromChain)
query.Add("toChain", p.ToChain)
Expand Down

0 comments on commit 55d7aeb

Please sign in to comment.