Skip to content

Commit 4d5781f

Browse files
authored
Fix mayan explorer order ID (#60)
1 parent 7c0d84e commit 4d5781f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

protocol/mayan/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func NewMayanExplorer() *MayanExplorer {
4141
}
4242

4343
func (c *MayanExplorer) GetSwap(hash string) (*MayanSwap, error) {
44-
url := fmt.Sprintf("%s/v3/swap/order-id/%s", MAYAN_EXPLORER_URL, hash)
44+
url := fmt.Sprintf("%s/v3/swap/order-id/SWIFT_%s", MAYAN_EXPLORER_URL, hash)
4545
resp, err := c.HTTPClient.Get(url)
4646
if err != nil {
4747
return nil, fmt.Errorf("request failed: %w", err)

protocol/mayan/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func Test_MayanExplorer_GetSwap(t *testing.T) {
8484
client := mayan.NewMayanExplorer()
8585
client.HTTPClient.Transport = roundTripperFunc(func(req *http.Request) (*http.Response, error) {
8686
// Verify URL construction
87-
expectedURL := fmt.Sprintf("%s/v3/swap/order-id/%s", mayan.MAYAN_EXPLORER_URL, tc.hash)
87+
expectedURL := fmt.Sprintf("%s/v3/swap/order-id/SWIFT_%s", mayan.MAYAN_EXPLORER_URL, tc.hash)
8888
if req.URL.String() != expectedURL {
8989
return nil, fmt.Errorf("unexpected URL: got %s, want %s", req.URL.String(), expectedURL)
9090
}

0 commit comments

Comments
 (0)