@manifoldxyz/marketplace-sdk 3.0.0 → 3.0.1
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.
|
@@ -53,6 +53,7 @@ var APIEndpoints;
|
|
|
53
53
|
(function (APIEndpoints) {
|
|
54
54
|
APIEndpoints["GOERLI"] = "https://goerli.marketplace.api.manifoldxyz.dev";
|
|
55
55
|
APIEndpoints["MAINNET"] = "https://marketplace.api.manifoldxyz.dev";
|
|
56
|
+
APIEndpoints["OPTIMISM"] = "https://optimism.marketplace.api.manifoldxyz.dev";
|
|
56
57
|
APIEndpoints["CAMPAIGN"] = "https://redeem.api.manifoldxyz.dev";
|
|
57
58
|
})(APIEndpoints || (APIEndpoints = {}));
|
|
58
59
|
const NULL_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
@@ -1205,6 +1206,9 @@ class MarketplaceListing {
|
|
|
1205
1206
|
if (network == frontend_provider_types_1.EthereumNetwork.MAINNET) {
|
|
1206
1207
|
return APIEndpoints.MAINNET;
|
|
1207
1208
|
}
|
|
1209
|
+
else if (network == frontend_provider_types_1.EthereumNetwork.OPTIMISM) {
|
|
1210
|
+
return APIEndpoints.OPTIMISM;
|
|
1211
|
+
}
|
|
1208
1212
|
else if (network == frontend_provider_types_1.EthereumNetwork.GOERLI) {
|
|
1209
1213
|
return APIEndpoints.GOERLI;
|
|
1210
1214
|
}
|
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ enum MarketplaceTopic {
|
|
|
41
41
|
enum APIEndpoints {
|
|
42
42
|
GOERLI = 'https://goerli.marketplace.api.manifoldxyz.dev',
|
|
43
43
|
MAINNET = 'https://marketplace.api.manifoldxyz.dev',
|
|
44
|
+
OPTIMISM = 'https://optimism.marketplace.api.manifoldxyz.dev',
|
|
44
45
|
CAMPAIGN = 'https://redeem.api.manifoldxyz.dev',
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -1158,6 +1159,8 @@ class MarketplaceListing {
|
|
|
1158
1159
|
const network = window.ManifoldEthereumProvider.network()
|
|
1159
1160
|
if (network == EthereumNetwork.MAINNET) {
|
|
1160
1161
|
return APIEndpoints.MAINNET
|
|
1162
|
+
} else if (network == EthereumNetwork.OPTIMISM) {
|
|
1163
|
+
return APIEndpoints.OPTIMISM
|
|
1161
1164
|
} else if (network == EthereumNetwork.GOERLI) {
|
|
1162
1165
|
return APIEndpoints.GOERLI
|
|
1163
1166
|
} else {
|