@fileverse-dev/formulajs 4.4.11-mod-81 → 4.4.11-mod-82
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/lib/browser/formula.js +48 -39
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +65 -12
- package/lib/esm/index.mjs +65 -12
- package/package.json +1 -1
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.11-mod-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.11-mod-82 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -11126,44 +11126,52 @@ function _typeof(o) {
|
|
|
11126
11126
|
_inherits(InvalidApiKeyError, _Error6);
|
|
11127
11127
|
return _createClass(InvalidApiKeyError);
|
|
11128
11128
|
}(_wrapNativeSuper(Error));
|
|
11129
|
-
var PROXY_MAP
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11129
|
+
var PROXY_MAP;
|
|
11130
|
+
function initializeProxyMap() {
|
|
11131
|
+
console.log("initializeProxyMap", window.NEXT_PUBLIC_PROXY_BASE_URL);
|
|
11132
|
+
if (!PROXY_MAP) {
|
|
11133
|
+
var fileverseProxyUrl = "".concat(window.NEXT_PUBLIC_PROXY_BASE_URL, "/proxy");
|
|
11134
|
+
PROXY_MAP = {
|
|
11135
|
+
Etherscan: {
|
|
11136
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11137
|
+
removeParams: [ "apikey" ]
|
|
11138
|
+
},
|
|
11139
|
+
Basescan: {
|
|
11140
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11141
|
+
removeParams: [ "apikey" ]
|
|
11142
|
+
},
|
|
11143
|
+
Gnosisscan: {
|
|
11144
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11145
|
+
removeParams: [ "apikey" ]
|
|
11146
|
+
},
|
|
11147
|
+
Coingecko: {
|
|
11148
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11149
|
+
removeParams: [ "apikey" ]
|
|
11150
|
+
},
|
|
11151
|
+
Firefly: {
|
|
11152
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11153
|
+
removeParams: [ "apikey" ]
|
|
11154
|
+
},
|
|
11155
|
+
Neynar: {
|
|
11156
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11157
|
+
removeParams: [ "api_key" ]
|
|
11158
|
+
},
|
|
11159
|
+
Safe: {
|
|
11160
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11161
|
+
removeParams: [ "api_key" ]
|
|
11162
|
+
},
|
|
11163
|
+
Defillama: {
|
|
11164
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11165
|
+
removeParams: [ "api_key" ]
|
|
11166
|
+
},
|
|
11167
|
+
GnosisPay: {
|
|
11168
|
+
url: "".concat(fileverseProxyUrl, "/proxy"),
|
|
11169
|
+
removeParams: [ "api_key" ]
|
|
11170
|
+
}
|
|
11171
|
+
};
|
|
11165
11172
|
}
|
|
11166
|
-
|
|
11173
|
+
return PROXY_MAP;
|
|
11174
|
+
}
|
|
11167
11175
|
function removeUrlParams(url, paramsToRemove) {
|
|
11168
11176
|
if (!paramsToRemove || paramsToRemove.length === 0) {
|
|
11169
11177
|
return url;
|
|
@@ -11178,9 +11186,10 @@ function _typeof(o) {
|
|
|
11178
11186
|
}
|
|
11179
11187
|
function getUrlAndHeaders(_ref) {
|
|
11180
11188
|
var url = _ref.url, serviceName = _ref.serviceName, _ref$headers = _ref.headers, headers = _ref$headers === void 0 ? {} : _ref$headers;
|
|
11189
|
+
var proxyMap = initializeProxyMap();
|
|
11181
11190
|
var apiKeyLS = window.localStorage.getItem(SERVICES_API_KEY[serviceName]);
|
|
11182
11191
|
var isProxyModeEnabledValue = apiKeyLS === "DEFAULT_PROXY_MODE";
|
|
11183
|
-
var proxyConfig =
|
|
11192
|
+
var proxyConfig = proxyMap[serviceName];
|
|
11184
11193
|
if (!proxyConfig && SERVICES_API_KEY[serviceName] && (!apiKeyLS || apiKeyLS === "")) {
|
|
11185
11194
|
throw new MissingApiKeyError(SERVICES_API_KEY[serviceName]);
|
|
11186
11195
|
}
|