diff --git a/.github/workflows/deploy-jungle-testnet.yaml b/.github/workflows/deploy-jungle-testnet.yaml index dfc0c33c..6f0ed2c0 100644 --- a/.github/workflows/deploy-jungle-testnet.yaml +++ b/.github/workflows/deploy-jungle-testnet.yaml @@ -52,7 +52,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'EOS' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://jungle4.eosq.eosnation.io/tx/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-lacchain.yaml b/.github/workflows/deploy-lacchain.yaml index 4c983db2..726268ff 100644 --- a/.github/workflows/deploy-lacchain.yaml +++ b/.github/workflows/deploy-lacchain.yaml @@ -54,7 +54,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: '' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/undiscoverable-bps"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/undiscoverable-bps","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://eosio-explorer.lacchain.net/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'true' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-libre-testnet.yaml b/.github/workflows/deploy-libre-testnet.yaml index 944aab05..245dc769 100644 --- a/.github/workflows/deploy-libre-testnet.yaml +++ b/.github/workflows/deploy-libre-testnet.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'LIBRE' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://libre-testnet-explorer.edenia.cloud/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' @@ -82,7 +82,8 @@ jobs: # hapi HAPI_EOS_API_NETWORK_NAME: libre HAPI_EOS_API_ENDPOINTS: '["https://libre-testnet.edenia.cloud","https://api.testnet.libre.cryptobloks.io","https://libre-testnet.eosphere.io"]' - HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT: '' + HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT: 'ws://api-node.libre-testnet:8080' + HAPI_EOS_BLOCK_HISTORY_DAYS: 90 HAPI_EOS_API_CHAIN_ID: b64646740308df2ee06c6b72f34c0f7fa066d940e831f752db2006fcc2b78dee HAPI_EOS_BASE_ACCOUNT: ${{ secrets.HAPI_EOS_BASE_ACCOUNT }} HAPI_EOS_BASE_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_BASE_ACCOUNT_PASSWORD }} diff --git a/.github/workflows/deploy-mainnet.yaml b/.github/workflows/deploy-mainnet.yaml index 967a8b3d..acf0f52b 100644 --- a/.github/workflows/deploy-mainnet.yaml +++ b/.github/workflows/deploy-mainnet.yaml @@ -53,7 +53,7 @@ jobs: REACT_APP_EOS_API_NETWORK_LOGO: 'https://antelope.tools/images/eos.png' REACT_APP_TOKEN_SYMBOL: 'EOS' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://bloks.io/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-proton-testnet.yaml b/.github/workflows/deploy-proton-testnet.yaml index c66a151a..94960280 100644 --- a/.github/workflows/deploy-proton-testnet.yaml +++ b/.github/workflows/deploy-proton-testnet.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'XPR' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://testnet.protonscan.io/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-proton.yaml b/.github/workflows/deploy-proton.yaml index 87964ff8..6099f227 100644 --- a/.github/workflows/deploy-proton.yaml +++ b/.github/workflows/deploy-proton.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'XPR' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks","/block-distribution","/cpu-benchmark","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://www.protonscan.io/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-telos-testnet.yaml b/.github/workflows/deploy-telos-testnet.yaml index 208e0529..e2b11a4b 100644 --- a/.github/workflows/deploy-telos-testnet.yaml +++ b/.github/workflows/deploy-telos-testnet.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'TLOS' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://explorer-test.telos.net/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED=: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-telos.yaml b/.github/workflows/deploy-telos.yaml index 2702bfca..65a297ba 100644 --- a/.github/workflows/deploy-telos.yaml +++ b/.github/workflows/deploy-telos.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'TLOS' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://explorer.telos.net/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED=: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-ultra-testnet.yaml b/.github/workflows/deploy-ultra-testnet.yaml index e623d45f..c9425b1a 100644 --- a/.github/workflows/deploy-ultra-testnet.yaml +++ b/.github/workflows/deploy-ultra-testnet.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'UOS' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/block-producers","/nodes","/missed-blocks","/endpoints","/bpjson","/ricardian-contract","/block-distribution","/nodes-distribution","/cpu-benchmark","/rewards-distribution","/undiscoverable-bps","/endpoints-stats"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/block-producers","/nodes","/missed-blocks","/endpoints","/bpjson","/ricardian-contract","/block-distribution","/nodes-distribution","/cpu-benchmark","/rewards-distribution","/undiscoverable-bps","/endpoints-stats","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://explorer.testnet.ultra.io/tx/(transaction)' REACT_APP_STATE_HISTORY_ENABLED: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-wax-testnet.yaml b/.github/workflows/deploy-wax-testnet.yaml index a327d8b5..d9b1c0dc 100644 --- a/.github/workflows/deploy-wax-testnet.yaml +++ b/.github/workflows/deploy-wax-testnet.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'WAX' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://wax-test.bloks.io/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED=: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/.github/workflows/deploy-wax.yaml b/.github/workflows/deploy-wax.yaml index fbf4fd23..816920cd 100644 --- a/.github/workflows/deploy-wax.yaml +++ b/.github/workflows/deploy-wax.yaml @@ -56,7 +56,7 @@ jobs: REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000 REACT_APP_TOKEN_SYMBOL: 'WAX' REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]' - REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution"]' + REACT_APP_DISABLED_MENU_ITEMS: '["/missed-blocks", "/cpu-benchmark","/block-distribution","/stress-test"]' REACT_APP_BLOCK_EXPLORER_URL: 'https://wax.bloks.io/transaction/(transaction)' REACT_APP_STATE_HISTORY_ENABLED=: 'false' REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8' diff --git a/docker-compose.yaml b/docker-compose.yaml index 5cb0b0af..1cf4677d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -68,6 +68,7 @@ services: HAPI_EOSRATE_GET_STATS_URL: '${HAPI_EOSRATE_GET_STATS_URL}' HAPI_EOSRATE_GET_STATS_USER: '${HAPI_EOSRATE_GET_STATS_USER}' HAPI_EOSRATE_GET_STATS_PASSWORD: '${HAPI_EOSRATE_GET_STATS_PASSWORD}' + HAPI_EOS_BLOCK_HISTORY_DAYS: '${HAPI_EOS_BLOCK_HISTORY_DAYS}' hasura: container_name: '${STAGE}-${APP_NAME}-hasura' image: hasura/graphql-engine:v2.16.0.cli-migrations-v3 diff --git a/hapi/src/config/eos.config.js b/hapi/src/config/eos.config.js index 26fc45cf..b4484bed 100644 --- a/hapi/src/config/eos.config.js +++ b/hapi/src/config/eos.config.js @@ -8,6 +8,8 @@ module.exports = { : '', stateHistoryPluginEndpoint: process.env.HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT, + keepBlockHistoryForDays: + parseInt(process.env.HAPI_EOS_BLOCK_HISTORY_DAYS) || 0, chainId: process.env.HAPI_EOS_API_CHAIN_ID, eosChainId: 'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906', diff --git a/hapi/src/services/state-history-plugin.service.js b/hapi/src/services/state-history-plugin.service.js index fe4b6917..6e5912bb 100644 --- a/hapi/src/services/state-history-plugin.service.js +++ b/hapi/src/services/state-history-plugin.service.js @@ -132,6 +132,23 @@ const handleBlocksResult = async data => { } } +const cleanOldBlocks = async () => { + const date = new Date() + const days = eosConfig.keepBlockHistoryForDays + + date.setSeconds(date.getSeconds() - 60 * 60 * 24 * days) + + const mutation = ` + mutation ($date: timestamptz) { + delete_block_history (where: {timestamp: {_lt: $date}}) { + affected_rows + } + } + ` + + await hasuraUtil.request(mutation, { date }) +} + const init = async () => { if (!eosConfig.stateHistoryPluginEndpoint) { return @@ -177,5 +194,6 @@ const init = async () => { } module.exports = { + cleanOldBlocks, init } diff --git a/hapi/src/services/transactions.service.js b/hapi/src/services/transactions.service.js index 5bc8c8ae..d83057cf 100644 --- a/hapi/src/services/transactions.service.js +++ b/hapi/src/services/transactions.service.js @@ -17,7 +17,8 @@ const getTransactions = async (range = '3 Hours') => { FROM interval LEFT JOIN - block_history ON date_trunc('${granularity}', block_history.timestamp) = interval.value + ( SELECT * FROM block_history WHERE transactions_length > 0 ) + AS block_history ON date_trunc('${granularity}', block_history.timestamp) = interval.value GROUP BY 1 ORDER BY diff --git a/hapi/src/workers/producers.worker.js b/hapi/src/workers/producers.worker.js index 36863f46..c2e61c75 100644 --- a/hapi/src/workers/producers.worker.js +++ b/hapi/src/workers/producers.worker.js @@ -64,14 +64,14 @@ const start = async () => { run('CPU WORKER', cpuService.worker, workersConfig.cpuWorkerInterval) run('CPU WORKER CLEANUP', cpuService.cleanOldBenchmarks, 86400) } - + if (eosConfig.stateHistoryPluginEndpoint) { + run('BLOCK HISTORY CLEANUP', stateHistoryPluginService.cleanOldBlocks, 43200) run('SYNC BLOCK HISTORY', stateHistoryPluginService.init) run('SYNC MISSED BLOCKS', missedBlocksService.syncMissedBlocks) run('SYNC MISSED BLOCKS PER PRODUCER', statsService.getCurrentMissedBlock) run('SYNC SCHEDULE HISTORY', demuxService.init) run('SYNC TPS', statsService.syncTPSAllTimeHigh) - run('SYNC TRX BY INTERVALS', statsService.formatTransactionHistory, 10800) run( 'SYNC TRANSACTIONS INFO', statsService.syncTransactionsInfo, diff --git a/kubernetes/configmap-dashboard.yaml b/kubernetes/configmap-dashboard.yaml index 5553fb71..6b8385af 100644 --- a/kubernetes/configmap-dashboard.yaml +++ b/kubernetes/configmap-dashboard.yaml @@ -96,6 +96,7 @@ data: HAPI_EOSRATE_GET_STATS_URL: '${HAPI_EOSRATE_GET_STATS_URL}' HAPI_EOSRATE_GET_STATS_USER: '${HAPI_EOSRATE_GET_STATS_USER}' HAPI_EOSRATE_GET_STATS_PASSWORD: '${HAPI_EOSRATE_GET_STATS_PASSWORD}' + HAPI_EOS_BLOCK_HISTORY_DAYS: '${HAPI_EOS_BLOCK_HISTORY_DAYS}' --- apiVersion: v1 kind: ConfigMap diff --git a/webapp/src/context/state.context.js b/webapp/src/context/state.context.js index 93e3bff3..53da0425 100644 --- a/webapp/src/context/state.context.js +++ b/webapp/src/context/state.context.js @@ -42,6 +42,48 @@ const sharedStateReducer = (state, action) => { } } + case 'pushTPB': { + if (state.tpb[0].blocks[0] === action.payload.blocks[0]) return { ...state } + + const tpb = JSON.parse(JSON.stringify(state.tpb)) + + if (tpb.length >= 60) { + tpb.pop() + } + + return { + ...state, + tpsWaitingBlock: !state.tpsWaitingBlock ? action.payload : null, + tpb: [action.payload, ...tpb], + } + } + + case 'pushTPS': { + const previousBlock = state.tpb[1] + + if (!state.tpsWaitingBlock || !previousBlock) return { ...state } + + let tps = JSON.parse(JSON.stringify(state.tps)) + + if (state.tps.length >= 30) { + tps.pop() + } + + return { + ...state, + tps: [ + { + blocks: [previousBlock.blocks[0], action.payload.blocks[0]], + transactions: + previousBlock.transactions + action.payload.transactions, + cpu: action.payload.cpu + previousBlock.cpu, + net: action.payload.net + previousBlock.net, + }, + ...tps, + ], + } + } + case 'updateTransactionsStats': { return { ...state, @@ -107,7 +149,7 @@ export const SharedStateProvider = ({ ...props }) => { export const useSharedState = () => { const context = React.useContext(SharedStateContext) - const [lastBlock, setLastBlock] = useState() + const [intervalNumber, setIntervalNumber] = useState(null) if (!context) { throw new Error(`useSharedState must be used within a SharedStateContext`) @@ -139,75 +181,45 @@ export const useSharedState = () => { }) } - const getBlock = useCallback( async (block) => { - try { - const data = await eosApi.getBlock(block) - let tpb = state.tpb - - if (state.tpb.length >= 60) { - tpb.pop() - } + const getUsage = block => { + return block?.transactions?.reduce( + (total, current) => { + total.cpu += current.cpu_usage_us + total.net += current.net_usage_words + return total + }, + { net: 0, cpu: 0 }, + ) + } - tpb = [ - { - blocks: [block], - transactions: data.transactions.length, - }, - ...tpb, - ] + const getBlock = useCallback( + async (block) => { + try { + const data = await eosApi.getBlock(block) - if (!state.tpsWaitingBlock) { dispatch({ - type: 'updateTransactionsStats', + type: 'pushTPB', payload: { - tpb, - tpsWaitingBlock: { - block, - transactions: data.transactions.length, - }, + blocks: [block], + transactions: data.transactions.length, + ...getUsage(data), }, }) - return - } - - let tps = state.tps - - if (state.tps.length >= 30) { - tps.pop() + dispatch({ + type: 'pushTPS', + payload: { + blocks: [block], + transactions: data.transactions.length, + ...getUsage(data), + }, + }) + } catch (error) { + console.error(error?.message || error) } - - tps = [ - { - blocks: [state.tpsWaitingBlock.block, block], - transactions: - state.tpsWaitingBlock.transactions + data.transactions.length, - }, - ...tps, - ] - - dispatch({ - type: 'updateTransactionsStats', - payload: { - tps, - tpb, - tpsWaitingBlock: null, - }, - }) - } catch (error) { - console.error(error?.message || error) - } - }, [dispatch, state.tpb, state.tps, state.tpsWaitingBlock]) - - useEffect(() => { - if (!lastBlock) return - - const updateTransactions = async () => { - await getBlock(lastBlock) - } - - updateTransactions() - }, [lastBlock, getBlock]) + }, + [dispatch], + ) const startTrackingProducerSchedule = async ({ interval = 120 } = {}) => { if (scheduleInterval) return @@ -221,7 +233,7 @@ export const useSharedState = () => { console.error(error?.message || error) if (error?.message === ENDPOINTS_ERROR) { - await stopTrackingProducerSchedule() + stopTrackingProducerSchedule() setTimeout(() => { startTrackingProducerSchedule({ interval }) }, waitTrackingInterval) @@ -248,37 +260,28 @@ export const useSharedState = () => { payload: { ...info }, }) - setLastBlock(info.head_block_num) + await getBlock(info.head_block_num) } catch (error) { console.error(error?.message || error) if (error?.message === ENDPOINTS_ERROR) { - await stopTrackingInfo() - setTimeout(() => { - startTrackingInfo({ interval }) - }, waitTrackingInterval) + clearInterval(infoInterval) } } } - if (interval === 0) { - await handle() - return - } - - await handle() - if (infoInterval) return infoInterval = setInterval(handle, interval * 1000) + setIntervalNumber(infoInterval) } - const stopTrackingInfo = async () => { - if (!infoInterval) return + const stopTrackingInfo = useCallback(() => { + if (!intervalNumber) return - clearInterval(infoInterval) - infoInterval = null - } + clearInterval(intervalNumber) + setIntervalNumber(null) + }, [intervalNumber]) const stopTrackingProducerSchedule = () => { if (!scheduleInterval) return diff --git a/webapp/src/gql/producer.gql.js b/webapp/src/gql/producer.gql.js index 1c204798..7d522f64 100644 --- a/webapp/src/gql/producer.gql.js +++ b/webapp/src/gql/producer.gql.js @@ -220,7 +220,7 @@ export const FASTEST_ENDPOINTS_QUERY = gql`query($today: date){ }` export const HISTORY_ENDPOINTS_BY_PRODUCER_QUERY = gql`query($id: Int){ - endpoints: check_history_by_endpoint(order_by: [{value: asc},{date: asc}], where: {producer_id: {_eq: $id}}, distinct_on: [value]) { + endpoints: check_history_by_endpoint(order_by: [{value: asc},{date: asc}], where: {producer_id: {_eq: $id}}) { value date avg_time diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json index 8ab6f267..d93e393f 100644 --- a/webapp/src/language/en.json +++ b/webapp/src/language/en.json @@ -89,6 +89,9 @@ "/missed-blocks>sidebar": "Missed Blocks", "/missed-blocks>title": "Missed Blocks - EOSIO + Antelope Network Dashboard", "/missed-blocks>heading": "Missed Blocks", + "/stress-test>title": "Stress Test Dashboard", + "/stress-test>sidebar": "Stress Test", + "/stress-test>heading": "Stress Test", "/endpoints>sidebar": "API Endpoints", "/endpoints>title": "API Endpoints - EOSIO + Antelope Network Dashboard", "/endpoints>heading": "API Endpoints", @@ -150,7 +153,9 @@ "netLimitPerBlock": "Net Limit Per Block", "chainCpuLimit": "Chain CPU Limit", "chainNetLimit": "Chain Net Limit", - "timeToFinality": "Time to Finality" + "timeToFinality": "Time to Finality", + "cpuUsage": "CPU Usage", + "netUsage": "NET Usage" }, "blockProducersRoute": {}, "rewardsDistributionRoute": { diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json index fff5d015..1766b62f 100644 --- a/webapp/src/language/es.json +++ b/webapp/src/language/es.json @@ -82,6 +82,9 @@ "/nodes-distribution>sidebar": "Geo Distribución", "/nodes-distribution>title": "Distribución Geográfica de Nodos", "/nodes-distribution>heading": "Distribución Geográfica", + "/stress-test>title": "Panel de Prueba de Estrés", + "/stress-test>sidebar": "Prueba de Estrés", + "/stress-test>heading": "Prueba de Estrés", "/accounts>sidebar": "Cuentas y Contratos", "/accounts>title": "Cuentas y Contratos - Panel", "/accounts>heading": "Cuentas y Contratos", @@ -156,7 +159,9 @@ "netLimitPerBlock": "Límite Red por bloque", "chainCpuLimit": "Límite de CPU en cadena", "chainNetLimit": "Límite de Net en cadena", - "timeToFinality": "Tiempo para finalidad" + "timeToFinality": "Tiempo para finalidad", + "cpuUsage": "Uso del CPU", + "netUsage": "Uso de NET" }, "blockProducersRoute": {}, "rewardsDistributionRoute": { diff --git a/webapp/src/routes/Home/BlockProducerInfo.js b/webapp/src/routes/Home/BlockProducerInfo.js index 820ab712..5b1cb33e 100644 --- a/webapp/src/routes/Home/BlockProducerInfo.js +++ b/webapp/src/routes/Home/BlockProducerInfo.js @@ -3,10 +3,11 @@ import React, { lazy, useEffect, useState } from 'react' import { useQuery } from '@apollo/client' import PropTypes from 'prop-types' +import eosApi from '../../utils/eosapi' import { formatWithThousandSeparator } from '../../utils' import { PRODUCERS_QUERY, PRODUCERS_SUMMARY_QUERY } from '../../gql' import { useSharedState } from '../../context/state.context' -import { eosConfig } from '../../config' +import { eosConfig, generalConfig } from '../../config' const Card = lazy(() => import('@mui/material/Card')) const CardContent = lazy(() => import('@mui/material/CardContent')) @@ -25,9 +26,31 @@ const BlockProducerInfo = ({ t, classes }) => { const { data: producersSummary, loading: producersLoading } = useQuery( PRODUCERS_SUMMARY_QUERY, ) - const [{ schedule: scheduleInfo, info }] = useSharedState() + const [{ schedule: scheduleInfo, info, tps }] = useSharedState() const [total, setTotal] = useState(0) const [schedule, setSchedule] = useState({ producers: [] }) + const [globalConfig, setGlobalConfig] = useState() + + useEffect(() => { + const getTable = async () => { + try { + const { rows } = await eosApi.getTableRows({ + code: 'eosio', + scope: 'eosio', + table: 'global', + json: true, + lower_bound: null, + }) + + setGlobalConfig({ + maxBlockCPU: rows[0]?.max_block_cpu_usage, + maxBlockNET: rows[0]?.max_block_net_usage, + }) + } catch (error) {} + } + + getTable() + }, []) useEffect(() => { const newProducers = scheduleInfo.producers.map((item) => { @@ -140,7 +163,11 @@ const BlockProducerInfo = ({ t, classes }) => {
- +
{loading && } @@ -161,6 +188,44 @@ const BlockProducerInfo = ({ t, classes }) => { } /> + {globalConfig && ( +
+ + + {t('cpuUsage')} + + {`${formatWithThousandSeparator( + (tps[0]?.cpu / globalConfig.maxBlockCPU) * 100 || 0, + 2, + )} %`} + + + +
+ )} + {globalConfig && ( +
+ + + {t('netUsage')} + + {`${formatWithThousandSeparator( + (tps[0]?.net / globalConfig.maxBlockNET) * 100 || 0, + 2, + )} %`} + + + +
+ )}
diff --git a/webapp/src/routes/Home/TransactionInfo.js b/webapp/src/routes/Home/TransactionInfo.js index 1df32228..8a390239 100644 --- a/webapp/src/routes/Home/TransactionInfo.js +++ b/webapp/src/routes/Home/TransactionInfo.js @@ -1,6 +1,7 @@ /* eslint camelcase: 0 */ import React, { useEffect, useState } from 'react' import { useLazyQuery } from '@apollo/client' +import { makeStyles } from '@mui/styles' import { useTheme } from '@mui/material/styles' import clsx from 'clsx' import PropTypes from 'prop-types' @@ -14,17 +15,25 @@ import Typography from '@mui/material/Typography' import PlayArrowIcon from '@mui/icons-material/PlayArrow' import LinearProgress from '@mui/material/LinearProgress' -import { TRANSACTION_HISTORY_QUERY } from '../../gql' +import { TRANSACTION_QUERY } from '../../gql' import { rangeOptions } from '../../utils' import TransactionsLineChart from '../../components/TransactionsLineChart' import { useSharedState } from '../../context/state.context' -import { generalConfig } from '../../config' import EqualIcon from './EqualIcon' +import styles from './styles' + +const useStyles = makeStyles(styles) const options = ['Live (30s)', ...rangeOptions] -const TransactionInfo = ({ t, classes }) => { +const TransactionInfo = ({ + t, + startTrackingInfo, + stopTrackingInfo, + historyEnabled, +}) => { + const classes = useStyles() const theme = useTheme() const [{ tps, tpb }] = useSharedState() const [graphicData, setGraphicData] = useState([ @@ -40,7 +49,7 @@ const TransactionInfo = ({ t, classes }) => { const [option, setOption] = useState(options[0]) const [pause, setPause] = useState(false) const [getTransactionHistory, { data, loading }] = useLazyQuery( - TRANSACTION_HISTORY_QUERY, + TRANSACTION_QUERY, { fetchPolicy: 'network-only' }, ) @@ -53,6 +62,8 @@ const TransactionInfo = ({ t, classes }) => { for (let index = 0; index < tpb.length; index++) { trxPerBlock.push({ name: `Block: ${tpb[index].blocks.join()}`, + cpu: tpb[index].cpu, + net: tpb[index].net, y: tpb[index].transactions, x: index > 0 ? index / 2 : index, }) @@ -61,6 +72,8 @@ const TransactionInfo = ({ t, classes }) => { for (let index = 0; index < tps.length; index++) { trxPerSecond.push({ name: `Blocks: ${tps[index].blocks.join(', ')}`, + cpu: tpb[index].cpu, + net: tps[index].net, y: tps[index].transactions, x: index, }) @@ -82,34 +95,37 @@ const TransactionInfo = ({ t, classes }) => { }, [option, tps, tpb]) useEffect(() => { - if (option === options[0]) return + if (option === options[0]) { + setPause(false) + startTrackingInfo() + return + } + + stopTrackingInfo() setGraphicData([]) getTransactionHistory({ - variables: {}, + variables: { + range: option, + }, }) + // eslint-disable-next-line }, [option, getTransactionHistory]) useEffect(() => { - const trxHistory = data?.trxHistory?.length - ? data.trxHistory[0].transaction_history - : null - if (option === option[0]) return - if (!trxHistory) { + if (!data?.transactions.length) { setGraphicData([]) return } - const intervalGraphicData = (trxHistory[option] || []).map( - (transactionHistory) => { - return [ - new Date(transactionHistory.datetime).getTime(), - transactionHistory.transactions_count || 0, - ] - }, - ) + const intervalGraphicData = data.transactions.map((transactionHistory) => { + return [ + new Date(transactionHistory.datetime).getTime(), + transactionHistory.transactions_count || 0, + ] + }) setGraphicData([ { @@ -137,7 +153,7 @@ const TransactionInfo = ({ t, classes }) => {
- {generalConfig.historyEnabled && ( + {historyEnabled && ( <> {t('timeFrame')}