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