@filecoin-shipyard/use-filecoin-network-info
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -40,4 +40,4 @@ "use strict"; | ||
api = 'https://explorer.nightly.kittyhawk.wtf/api'; | ||
} else if (netName === 'devnet-text') { | ||
api = 'https://explorer.test.kittyhawk.wtf/api'; | ||
} else if (netName === 'devnet-staging') { | ||
api = 'https://explorer.staging.kittyhawk.wtf/api'; | ||
} | ||
@@ -85,2 +85,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3VzZUZpbGVjb2luTmV0d29ya0luZm8uanMiXSwibmFtZXMiOlsidXNlRmlsZWNvaW5OZXR3b3JrSW5mbyIsImludGVydmFsIiwiZXJyb3IiLCJzZXRFcnJvciIsIm5ldE5hbWUiLCJoZWFkQmxvY2tzIiwic2V0SGVhZEJsb2NrcyIsImhlaWdodCIsInNldEhlaWdodCIsInVwZGF0ZVRpbWUiLCJzZXRVcGRhdGVUaW1lIiwic3RhdGUiLCJ0aW1lb3V0SWQiLCJkb1dvcmsiLCJhcGkiLCJyZXNwb25zZSIsImhlYWRDaWRzIiwianNvbiIsIm5ld0hlaWdodCIsImNpZCIsImNpZFN0cmluZyIsImJsb2NrIiwidG9TdHJpbmciLCJOdW1iZXIiLCJIZWFkZXIiLCJEYXRlIiwibm93IiwiZXJyIiwic2NoZWR1bGUiLCJzZXRUaW1lb3V0IiwidGhlbiIsImNsZWFyVGltZW91dCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOztBQUNBOztBQUNBOzs7Ozs7QUFFZSxTQUFTQSxzQkFBVCxDQUFpQztBQUM5Q0MsRUFBQUEsUUFBUSxHQUFHO0FBRG1DLENBQWpDLEVBRVo7QUFDRCxRQUFNLENBQUNDLEtBQUQsRUFBUUMsUUFBUixJQUFvQixzQkFBMUI7QUFDQSxRQUFNLEdBQUdDLE9BQUgsSUFBYyxnQ0FBa0IsS0FBbEIsQ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9PSBzdGF0ZS5oZWlnaHQpIHtcbiAgICAgICAgICBzdGF0ZS5oZWlnaHQgPSBuZXdIZWlnaHRcbiAgICAgICAgICBzZXRIZWlnaHQoc3RhdGUuaGVpZ2h0KVxuICAgICAgICAgIHNldFVwZGF0ZVRpbWUoRGF0ZS5ub3coKSlcbiAgICAgICAgfVxuICAgICAgICBzZXRFcnJvcihudWxsKVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNldEVycm9yKGVycilcbiAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gc2NoZWR1bGUgKCkge1xuICAgICAgc3RhdGUudGltZW91dElkID0gc2V0VGltZW91dChhc3luYyAoKSA9PiB7XG4gICAgICAgIGF3YWl0IGRvV29yaygpXG4gICAgICAgIHNjaGVkdWxlKClcbiAgICAgIH0sIGludGVydmFsKVxuICAgIH1cbiAgICBkb1dvcmsoKS50aGVuKHNjaGVkdWxlKVxuICAgIHJldHVybiAoKSA9PiBjbGVhclRpbWVvdXQoc3RhdGUudGltZW91dElkKVxuICB9LCBbbmV0TmFtZV0pXG5cbiAgcmV0dXJuIFtlcnJvciwgbmV0TmFtZSwgaGVhZEJsb2NrcywgaGVpZ2h0LCB1cGRhdGVUaW1lXVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3VzZUZpbGVjb2luTmV0d29ya0luZm8uanMiXSwibmFtZXMiOlsidXNlRmlsZWNvaW5OZXR3b3JrSW5mbyIsImludGVydmFsIiwiZXJyb3IiLCJzZXRFcnJvciIsIm5ldE5hbWUiLCJoZWFkQmxvY2tzIiwic2V0SGVhZEJsb2NrcyIsImhlaWdodCIsInNldEhlaWdodCIsInVwZGF0ZVRpbWUiLCJzZXRVcGRhdGVUaW1lIiwic3RhdGUiLCJ0aW1lb3V0SWQiLCJkb1dvcmsiLCJhcGkiLCJyZXNwb25zZSIsImhlYWRDaWRzIiwianNv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ZXJyb3IsIG5ldE5hbWUsIGhlYWRCbG9ja3MsIGhlaWdodCwgdXBkYXRlVGltZV1cbn1cbiJdfQ== |
{ | ||
"name": "@filecoin-shipyard/use-filecoin-network-info", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "React hook to query network info via Filecoin API", | ||
@@ -5,0 +5,0 @@ "main": "dist/useFilecoinNetworkInfo.js", |
@@ -26,4 +26,4 @@ import React, { useState, useEffect } from 'react' | ||
api = 'https://explorer.nightly.kittyhawk.wtf/api' | ||
} else if (netName === 'devnet-text') { | ||
api = 'https://explorer.test.kittyhawk.wtf/api' | ||
} else if (netName === 'devnet-staging') { | ||
api = 'https://explorer.staging.kittyhawk.wtf/api' | ||
} | ||
@@ -30,0 +30,0 @@ if (!api) return |
11949