@fileverse-dev/formulajs 4.4.29 → 4.4.31

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/cjs/index.cjs CHANGED
@@ -6469,6 +6469,10 @@ function FLOOR(number, significance) {
6469
6469
  return anyError$1
6470
6470
  }
6471
6471
 
6472
+ if(number === 0 && significance === 0){
6473
+ return 0
6474
+ }
6475
+
6472
6476
  if (!significance) {
6473
6477
  return div0
6474
6478
  }
@@ -17999,19 +18003,13 @@ async function handleScanRequest({
17999
18003
  chainId,
18000
18004
  network
18001
18005
  }) {
18002
- const API_INFO_MAP = {
18003
- BASE: { url: 'https://api.basescan.org/api', apiKeyName: SERVICES_API_KEY.Basescan },
18004
- ETHERSCAN: { url: 'https://api.etherscan.io/v2/api', apiKeyName: SERVICES_API_KEY.Etherscan },
18005
- GNOSIS: { url: 'https://api.gnosisscan.io/api', apiKeyName: SERVICES_API_KEY.Gnosisscan }
18006
- };
18007
18006
 
18008
18007
  if (type !== 'gas') {
18009
18008
  address = await fromEnsNameToAddress$1.validateAndGetAddress(address);
18010
18009
  }
18011
18010
 
18012
- const apiInfo = API_INFO_MAP[functionName];
18011
+ const apiInfo = { url: 'https://api.etherscan.io/v2/api', apiKeyName: SERVICES_API_KEY.Etherscan };
18013
18012
  const baseUrl = apiInfo?.url;
18014
- if (!baseUrl) throw new ValidationError(`Api not found for: ${functionName}`)
18015
18013
 
18016
18014
 
18017
18015
  const ACTION_MAP = {
@@ -18026,7 +18024,6 @@ async function handleScanRequest({
18026
18024
 
18027
18025
  const module = action === 'gasoracle' ? 'gastracker' : 'account';
18028
18026
  let url = `${baseUrl}?chainid=${chainId}&module=${module}&action=${action}&apikey=${apiKey}`;
18029
-
18030
18027
  if (['all-txns', 'token-txns', 'nft-txns'].includes(type)) {
18031
18028
  url += `&address=${address}&startblock=0&endblock=99999999&sort=asc`;
18032
18029
 
@@ -312,7 +312,7 @@ If "derivatives": exchange name (e.g., "binance_futures", "hyperliquid", "weex-f
312
312
  // src/crypto/defillama/metadata.js
313
313
  var DEFILLAMA_metadata = {
314
314
  API_KEY: SERVICES_API_KEY.Defillama,
315
- LOGO: "https://defillama.com/favicon-32x32.png",
315
+ LOGO: "https://defillama.com/favicon.ico",
316
316
  BRAND_COLOR: "#f8f5fc",
317
317
  BRAND_SECONDARY_COLOR: "#855dcd",
318
318
  n: "DEFILLAMA",
package/lib/esm/index.mjs CHANGED
@@ -6467,6 +6467,10 @@ function FLOOR(number, significance) {
6467
6467
  return anyError$1
6468
6468
  }
6469
6469
 
6470
+ if(number === 0 && significance === 0){
6471
+ return 0
6472
+ }
6473
+
6470
6474
  if (!significance) {
6471
6475
  return div0
6472
6476
  }
@@ -17997,19 +18001,13 @@ async function handleScanRequest({
17997
18001
  chainId,
17998
18002
  network
17999
18003
  }) {
18000
- const API_INFO_MAP = {
18001
- BASE: { url: 'https://api.basescan.org/api', apiKeyName: SERVICES_API_KEY.Basescan },
18002
- ETHERSCAN: { url: 'https://api.etherscan.io/v2/api', apiKeyName: SERVICES_API_KEY.Etherscan },
18003
- GNOSIS: { url: 'https://api.gnosisscan.io/api', apiKeyName: SERVICES_API_KEY.Gnosisscan }
18004
- };
18005
18004
 
18006
18005
  if (type !== 'gas') {
18007
18006
  address = await fromEnsNameToAddress$1.validateAndGetAddress(address);
18008
18007
  }
18009
18008
 
18010
- const apiInfo = API_INFO_MAP[functionName];
18009
+ const apiInfo = { url: 'https://api.etherscan.io/v2/api', apiKeyName: SERVICES_API_KEY.Etherscan };
18011
18010
  const baseUrl = apiInfo?.url;
18012
- if (!baseUrl) throw new ValidationError(`Api not found for: ${functionName}`)
18013
18011
 
18014
18012
 
18015
18013
  const ACTION_MAP = {
@@ -18024,7 +18022,6 @@ async function handleScanRequest({
18024
18022
 
18025
18023
  const module = action === 'gasoracle' ? 'gastracker' : 'account';
18026
18024
  let url = `${baseUrl}?chainid=${chainId}&module=${module}&action=${action}&apikey=${apiKey}`;
18027
-
18028
18025
  if (['all-txns', 'token-txns', 'nft-txns'].includes(type)) {
18029
18026
  url += `&address=${address}&startblock=0&endblock=99999999&sort=asc`;
18030
18027
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.29",
3
+ "version": "4.4.31",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {