Skip to content

Commit 0a475ab

Browse files
committed
fix: remove 0x
1 parent 3eda013 commit 0a475ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

protocol/lifi/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func NewLifiAPI() *LifiAPI {
3232

3333
// GetOrder fetches order from the LiFi API by its on-chain orderID
3434
func (a *LifiAPI) GetOrder(orderID string) (*lifi.LifiOrder, error) {
35-
url := fmt.Sprintf("%s/orders/status?onChainOrderId=0x%s", LIFI_URL, orderID)
35+
url := fmt.Sprintf("%s/orders/status?onChainOrderId=%s", LIFI_URL, orderID)
3636
resp, err := a.HTTPClient.Get(url)
3737
if err != nil {
3838
return nil, fmt.Errorf("request failed: %w", err)

protocol/lifi/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func Test_LifiAPI_GetOrder(t *testing.T) {
6565
t.Run(tc.name, func(t *testing.T) {
6666
client := lifi.NewLifiAPI()
6767
client.HTTPClient.Transport = roundTripperFunc(func(req *http.Request) (*http.Response, error) {
68-
expectedURL := fmt.Sprintf("%s/orders/status?onChainOrderId=0x%s", lifi.LIFI_URL, tc.id)
68+
expectedURL := fmt.Sprintf("%s/orders/status?onChainOrderId=%s", lifi.LIFI_URL, tc.id)
6969
if req.URL.String() != expectedURL {
7070
return nil, fmt.Errorf("unexpected URL: got %s, want %s", req.URL.String(), expectedURL)
7171
}

0 commit comments

Comments
 (0)