@manifoldxyz/marketplace-sdk 3.0.11 → 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,10 +52,10 @@ 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";
|
|
58
|
+
APIEndpoints["SEPOLIA"] = "https://sepolia.marketplace.api.manifoldxyz.dev";
|
|
59
59
|
APIEndpoints["CAMPAIGN"] = "https://redeem.api.manifoldxyz.dev";
|
|
60
60
|
})(APIEndpoints || (APIEndpoints = {}));
|
|
61
61
|
const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
@@ -1294,8 +1294,8 @@ class MarketplaceListing {
|
|
|
1294
1294
|
return response.json();
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
//
|
|
1298
|
-
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) {
|
|
1299
1299
|
response = yield fetch(`${this._getEndpoint()}/token/${tokenAddress}/${tokenId}/metadata`);
|
|
1300
1300
|
if (response.status === 200) {
|
|
1301
1301
|
return response.json();
|
|
@@ -1387,9 +1387,6 @@ class MarketplaceListing {
|
|
|
1387
1387
|
else if (network === frontend_provider_types_1.EthereumNetwork.BASE) {
|
|
1388
1388
|
return APIEndpoints.BASE;
|
|
1389
1389
|
}
|
|
1390
|
-
else if (network == frontend_provider_types_1.EthereumNetwork.GOERLI) {
|
|
1391
|
-
return APIEndpoints.GOERLI;
|
|
1392
|
-
}
|
|
1393
1390
|
else {
|
|
1394
1391
|
throw new Error(`Network not supported: ${network}`);
|
|
1395
1392
|
}
|
package/package.json
CHANGED
|
@@ -46,10 +46,10 @@ 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',
|
|
52
|
+
SEPOLIA = 'https://sepolia.marketplace.api.manifoldxyz.dev',
|
|
53
53
|
CAMPAIGN = 'https://redeem.api.manifoldxyz.dev',
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -1611,8 +1611,8 @@ class MarketplaceListing {
|
|
|
1611
1611
|
return response.json();
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
//
|
|
1615
|
-
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) {
|
|
1616
1616
|
response = await fetch(`${this._getEndpoint()}/token/${tokenAddress}/${tokenId}/metadata`);
|
|
1617
1617
|
if (response.status === 200) {
|
|
1618
1618
|
return response.json();
|
|
@@ -1712,8 +1712,6 @@ class MarketplaceListing {
|
|
|
1712
1712
|
return APIEndpoints.OPTIMISM;
|
|
1713
1713
|
} else if (network === EthereumNetwork.BASE) {
|
|
1714
1714
|
return APIEndpoints.BASE;
|
|
1715
|
-
} else if (network == EthereumNetwork.GOERLI) {
|
|
1716
|
-
return APIEndpoints.GOERLI;
|
|
1717
1715
|
} else {
|
|
1718
1716
|
throw new Error(`Network not supported: ${network}`);
|
|
1719
1717
|
}
|