@manifoldxyz/marketplace-sdk 3.0.12 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,7 +52,6 @@ var MarketplaceTopic;
|
|
|
52
52
|
exports.MarketplaceTopic = MarketplaceTopic;
|
|
53
53
|
var APIEndpoints;
|
|
54
54
|
(function (APIEndpoints) {
|
|
55
|
-
APIEndpoints["GOERLI"] = "https://goerli.marketplace.api.manifoldxyz.dev";
|
|
56
55
|
APIEndpoints["MAINNET"] = "https://marketplace.api.manifoldxyz.dev";
|
|
57
56
|
APIEndpoints["OPTIMISM"] = "https://optimism.marketplace.api.manifoldxyz.dev";
|
|
58
57
|
APIEndpoints["BASE"] = "https://base.marketplace.api.manifoldxyz.dev";
|
|
@@ -1295,8 +1294,8 @@ class MarketplaceListing {
|
|
|
1295
1294
|
return response.json();
|
|
1296
1295
|
}
|
|
1297
1296
|
}
|
|
1298
|
-
//
|
|
1299
|
-
if (isArweave || isIPFS || isOpenSea) {
|
|
1297
|
+
// Fall back if no response, or non-200 if Arweave, IPFS or OpenSea endpoints
|
|
1298
|
+
if (!response || isArweave || isIPFS || isOpenSea) {
|
|
1300
1299
|
response = yield fetch(`${this._getEndpoint()}/token/${tokenAddress}/${tokenId}/metadata`);
|
|
1301
1300
|
if (response.status === 200) {
|
|
1302
1301
|
return response.json();
|
|
@@ -1388,9 +1387,6 @@ class MarketplaceListing {
|
|
|
1388
1387
|
else if (network === frontend_provider_types_1.EthereumNetwork.BASE) {
|
|
1389
1388
|
return APIEndpoints.BASE;
|
|
1390
1389
|
}
|
|
1391
|
-
else if (network == frontend_provider_types_1.EthereumNetwork.GOERLI) {
|
|
1392
|
-
return APIEndpoints.GOERLI;
|
|
1393
|
-
}
|
|
1394
1390
|
else {
|
|
1395
1391
|
throw new Error(`Network not supported: ${network}`);
|
|
1396
1392
|
}
|
package/package.json
CHANGED
|
@@ -46,7 +46,6 @@ enum MarketplaceTopic {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
enum APIEndpoints {
|
|
49
|
-
GOERLI = 'https://goerli.marketplace.api.manifoldxyz.dev',
|
|
50
49
|
MAINNET = 'https://marketplace.api.manifoldxyz.dev',
|
|
51
50
|
OPTIMISM = 'https://optimism.marketplace.api.manifoldxyz.dev',
|
|
52
51
|
BASE = 'https://base.marketplace.api.manifoldxyz.dev',
|
|
@@ -1612,8 +1611,8 @@ class MarketplaceListing {
|
|
|
1612
1611
|
return response.json();
|
|
1613
1612
|
}
|
|
1614
1613
|
}
|
|
1615
|
-
//
|
|
1616
|
-
if (isArweave || isIPFS || isOpenSea) {
|
|
1614
|
+
// Fall back if no response, or non-200 if Arweave, IPFS or OpenSea endpoints
|
|
1615
|
+
if (!response || isArweave || isIPFS || isOpenSea) {
|
|
1617
1616
|
response = await fetch(`${this._getEndpoint()}/token/${tokenAddress}/${tokenId}/metadata`);
|
|
1618
1617
|
if (response.status === 200) {
|
|
1619
1618
|
return response.json();
|
|
@@ -1713,8 +1712,6 @@ class MarketplaceListing {
|
|
|
1713
1712
|
return APIEndpoints.OPTIMISM;
|
|
1714
1713
|
} else if (network === EthereumNetwork.BASE) {
|
|
1715
1714
|
return APIEndpoints.BASE;
|
|
1716
|
-
} else if (network == EthereumNetwork.GOERLI) {
|
|
1717
|
-
return APIEndpoints.GOERLI;
|
|
1718
1715
|
} else {
|
|
1719
1716
|
throw new Error(`Network not supported: ${network}`);
|
|
1720
1717
|
}
|