Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protocol/lifi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewLifiAPI() *LifiAPI {

// GetOrder fetches order from the LiFi API by its on-chain orderID
func (a *LifiAPI) GetOrder(orderID string) (*lifi.LifiOrder, error) {
url := fmt.Sprintf("%s/orders/status?onChainOrderId=0x%s", LIFI_URL, orderID)
url := fmt.Sprintf("%s/orders/status?onChainOrderId=%s", LIFI_URL, orderID)
resp, err := a.HTTPClient.Get(url)
if err != nil {
return nil, fmt.Errorf("request failed: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion protocol/lifi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func Test_LifiAPI_GetOrder(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
client := lifi.NewLifiAPI()
client.HTTPClient.Transport = roundTripperFunc(func(req *http.Request) (*http.Response, error) {
expectedURL := fmt.Sprintf("%s/orders/status?onChainOrderId=0x%s", lifi.LIFI_URL, tc.id)
expectedURL := fmt.Sprintf("%s/orders/status?onChainOrderId=%s", lifi.LIFI_URL, tc.id)
if req.URL.String() != expectedURL {
return nil, fmt.Errorf("unexpected URL: got %s, want %s", req.URL.String(), expectedURL)
}
Expand Down
Loading