@revoke.cash/chains 64.0.0 → 66.0.0

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.
package/dist/src/build.js CHANGED
@@ -108,14 +108,20 @@ var generateChainsFile = function () { return __awaiter(void 0, void 0, void 0,
108
108
  var annotateIconUrls = function (chains) { return __awaiter(void 0, void 0, void 0, function () {
109
109
  return __generator(this, function (_a) {
110
110
  return [2 /*return*/, Promise.all(chains.map(function (chain) { return __awaiter(void 0, void 0, void 0, function () {
111
- var icon, iconURL;
111
+ var iconUrl, icon, iconURL;
112
112
  var _a;
113
113
  return __generator(this, function (_b) {
114
114
  switch (_b.label) {
115
115
  case 0:
116
116
  if (!chain.icon)
117
117
  return [2 /*return*/, chain];
118
- return [4 /*yield*/, got_1.default("https://raw.githubusercontent.com/ethereum-lists/chains/master/_data/icons/" + chain.icon + ".json").json()];
118
+ iconUrl = "https://raw.githubusercontent.com/ethereum-lists/chains/master/_data/icons/" + chain.icon + ".json";
119
+ return [4 /*yield*/, got_1.default(iconUrl)
120
+ .json()
121
+ .catch(function () {
122
+ console.log("Error fetching icon for " + chain.name);
123
+ return [];
124
+ })];
119
125
  case 1:
120
126
  icon = (_b.sent())[0];
121
127
  iconURL = (_a = icon === null || icon === void 0 ? void 0 : icon.url) === null || _a === void 0 ? void 0 : _a.replace('ipfs://', 'https://ipfs.io/ipfs/');