@fileverse-dev/fortune-react 1.0.2-mod-93 → 1.0.2-mod-94
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/index.umd.js +20 -10
- package/dist/index.umd.min.js +8 -8
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -37055,7 +37055,8 @@
|
|
|
37055
37055
|
Basescan: "BASESCAN_API_KEY",
|
|
37056
37056
|
Gnosisscan: "GNOSIS_API_KEY",
|
|
37057
37057
|
Firefly: "FIRE_FLY_API_KEY",
|
|
37058
|
-
GnosisPay: 'GNOSIS_API_KEY'
|
|
37058
|
+
GnosisPay: 'GNOSIS_API_KEY',
|
|
37059
|
+
Neynar: 'NEYNAR_API_KEY'
|
|
37059
37060
|
};
|
|
37060
37061
|
|
|
37061
37062
|
const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
|
|
@@ -37472,20 +37473,21 @@
|
|
|
37472
37473
|
|
|
37473
37474
|
switch (lowerCategory) {
|
|
37474
37475
|
case 'price': {
|
|
37475
|
-
const
|
|
37476
|
-
const
|
|
37476
|
+
const vsCurrencies = param1;
|
|
37477
|
+
const token = param2;
|
|
37477
37478
|
if (!token || !vsCurrencies) {
|
|
37478
37479
|
return `${SERVICE_API_KEY.Coingecko}${ERROR_MESSAGES_FLAG.INVALID_PARAM}`;
|
|
37479
37480
|
}
|
|
37480
|
-
url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vsCurrencies}&
|
|
37481
|
+
url = `https://api.coingecko.com/api/v3/simple/price?vs_currencies=${vsCurrencies ? vsCurrencies : 'usd' }&symbols=${token}`;
|
|
37481
37482
|
break;
|
|
37482
37483
|
}
|
|
37483
37484
|
|
|
37484
37485
|
case 'market': {
|
|
37485
37486
|
const ecosystemMap = {
|
|
37486
|
-
|
|
37487
|
+
all: '',
|
|
37488
|
+
ethereum: 'ethereum-ecosystem',
|
|
37487
37489
|
base: 'base-ecosystem',
|
|
37488
|
-
|
|
37490
|
+
solana: 'solana-ecosystem',
|
|
37489
37491
|
gnosis: 'gnosis-chain',
|
|
37490
37492
|
hyperliquid: 'hyperliquid',
|
|
37491
37493
|
bitcoin: 'bitcoin-ecosystem',
|
|
@@ -37517,10 +37519,10 @@
|
|
|
37517
37519
|
|
|
37518
37520
|
case 'derivatives': {
|
|
37519
37521
|
const exchange = param1;
|
|
37520
|
-
if (exchange) {
|
|
37521
|
-
url = `https://api.coingecko.com/api/v3/derivatives
|
|
37522
|
+
if (!exchange || exchange === 'all') {
|
|
37523
|
+
url = `https://api.coingecko.com/api/v3/derivatives`;
|
|
37522
37524
|
} else {
|
|
37523
|
-
url = `https://api.coingecko.com/api/v3/derivatives
|
|
37525
|
+
url = `https://api.coingecko.com/api/v3/derivatives/exchanges/${exchange}?include_tickers=all`;
|
|
37524
37526
|
}
|
|
37525
37527
|
break;
|
|
37526
37528
|
}
|
|
@@ -37554,7 +37556,15 @@
|
|
|
37554
37556
|
return [output];
|
|
37555
37557
|
}
|
|
37556
37558
|
|
|
37557
|
-
const
|
|
37559
|
+
const data = json;
|
|
37560
|
+
|
|
37561
|
+
if (lowerCategory === 'derivatives') {
|
|
37562
|
+
if (json && json.tickers && json.tickers.tickers) {
|
|
37563
|
+
data = json.tickers.tickers;
|
|
37564
|
+
}
|
|
37565
|
+
}
|
|
37566
|
+
|
|
37567
|
+
const flatArray = Array.isArray(data) ? data : [data];
|
|
37558
37568
|
return flatArray.map(item => {
|
|
37559
37569
|
const flat = {};
|
|
37560
37570
|
for (const [key, value] of Object.entries(item)) {
|