Skip to content

Commit 9fea053

Browse files
author
Eugene Alekseev
committed
Fixed 2019 unity support
1 parent 547c5e5 commit 9fea053

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Assets/AnkrSDK/Scripts/OpenSea/OpenSeaAPIAssets.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static class OpenSeaAPIAssets
2323

2424
private static string BaseURL => $"{(_isTestNet ? EndPoint : TestNetEndPoint)}{Version}";
2525
private static string GetAssetsURL => $"{BaseURL}{GETAssets}";
26-
26+
2727
private static readonly TimeSpan DelayTimeSpan = TimeSpan.FromSeconds(1f);
2828

2929
private static string GetSingleAssetURL(string contractAddress, string tokenId) =>
@@ -114,8 +114,11 @@ private static async UniTask<string> CallAPI(string uri, Dictionary<string, stri
114114
}
115115

116116
await webRequest.SendWebRequest();
117-
117+
#if UNITY_2020_1_OR_NEWER
118118
if (webRequest.result == UnityWebRequest.Result.Success)
119+
#else
120+
if(!webRequest.isHttpError && !webRequest.isNetworkError)
121+
#endif
119122
{
120123
return webRequest.downloadHandler.text;
121124
}

0 commit comments

Comments
 (0)