From 48dc063e4d667608a71a4d7ebfca0e005addecf6 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 22 Sep 2022 16:52:14 -0600 Subject: [PATCH 1/6] fix(hapi): fix get bpjson - increase timeout to avoid empty bpjson - add condition to health check when bpjson is not found --- hapi/src/services/eosio.service.js | 2 +- hapi/src/utils/axios.util.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi/src/services/eosio.service.js b/hapi/src/services/eosio.service.js index e5ef53e0..d3f1222e 100644 --- a/hapi/src/services/eosio.service.js +++ b/hapi/src/services/eosio.service.js @@ -204,7 +204,7 @@ const getProducerHealthStatus = (bpJson) => { healthStatus.push({ name: 'bpJson', - valid: !!bpJson + valid: !!bpJson && !!Object.keys(bpJson).length }) healthStatus.push({ name: 'organization_name', diff --git a/hapi/src/utils/axios.util.js b/hapi/src/utils/axios.util.js index 27bd50de..bce8e852 100644 --- a/hapi/src/utils/axios.util.js +++ b/hapi/src/utils/axios.util.js @@ -3,7 +3,7 @@ const http = require('http') const https = require('https') const instance = axios.create({ - timeout: 30000, + timeout: 100000, httpAgent: new http.Agent({ timeout: 300000 }), httpsAgent: new https.Agent({ rejectUnauthorized: false, From 7b22d742302a57ceafddb6baa0909ec3685626ce Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 22 Sep 2022 16:58:16 -0600 Subject: [PATCH 2/6] fix(webapp): get all producers on nodes query --- webapp/src/hooks/customHooks/useNodeState.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/webapp/src/hooks/customHooks/useNodeState.js b/webapp/src/hooks/customHooks/useNodeState.js index 65a30b72..38c2b3cf 100644 --- a/webapp/src/hooks/customHooks/useNodeState.js +++ b/webapp/src/hooks/customHooks/useNodeState.js @@ -12,21 +12,30 @@ const useNodeState = () => { ] = useSearchState({ query: NODES_QUERY }) const [items, setItems] = useState([]) const [nodes, setNodes] = useState([]) + const PAGE_LIMIT = 28 const chips = [{ name: 'all' }, ...eosConfig.nodeTypes] + useEffect(() => { + setPagination((prev) => ({ + ...prev, + where: { bp_json: { _gt: { nodes: [] } } }, + limit: null, + })) + }, [setPagination]) + useEffect(() => { if (!nodes) return - const index = (pagination.page - 1) * pagination.limit + const index = (pagination.page - 1) * PAGE_LIMIT - setItems(nodes.slice(index, index + pagination.limit)) + setItems(nodes.slice(index, index + PAGE_LIMIT)) setPagination((prev) => ({ ...prev, - pages: Math.ceil((nodes?.length ?? 0) / pagination.limit), + pages: Math.ceil((nodes?.length ?? 0) / PAGE_LIMIT), })) - }, [nodes, pagination.page, pagination.limit, setPagination]) + }, [nodes, pagination.page, setPagination]) useEffect(() => { if (!producers) return From 4caa9cf00e015a6158b591dd9b8bd093860012e5 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Fri, 23 Sep 2022 09:20:02 -0600 Subject: [PATCH 3/6] fix(webapp): add optional chaining to node type on InformationCard component --- webapp/src/components/InformationCard/Nodes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/InformationCard/Nodes.js b/webapp/src/components/InformationCard/Nodes.js index 6a85cd91..684f0954 100644 --- a/webapp/src/components/InformationCard/Nodes.js +++ b/webapp/src/components/InformationCard/Nodes.js @@ -24,7 +24,7 @@ const Nodes = ({ nodes, producer, onNodeClick, t, type, classes }) => { {nodes.map((node, i) => (
- {node.name || node.node_type.toString()}{' '} + {node.name || node?.node_type?.toString()}{' '}
From f5bace5c8086fdf91012a9d7cf8f30fb49aaa48b Mon Sep 17 00:00:00 2001 From: Fabian Vives Date: Fri, 23 Sep 2022 13:57:14 -0600 Subject: [PATCH 4/6] fix(webapp): temporary fix for testnets --- .env.protontestnet | 2 +- .env.telostestnet | 2 +- .env.waxtestnet | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.protontestnet b/.env.protontestnet index 3bb2104b..7bfebf61 100644 --- a/.env.protontestnet +++ b/.env.protontestnet @@ -71,7 +71,7 @@ REACT_APP_HASURA_URL=http://localhost:8080/v1/graphql REACT_APP_EOS_API_NETWORK_NAME=proton-testnet REACT_APP_EOS_API_NETWORK_LABEL=Proton Testnet REACT_APP_EOS_API_NETWORK_LOGO=https://eosio.online/images/proton.png -REACT_APP_EOS_API_HOST=proton-testnet.edenia.cloud +REACT_APP_EOS_API_HOST=test.proton.eosusa.news REACT_APP_EOS_API_PORT=443 REACT_APP_EOS_API_PROTOCOL=https REACT_APP_EOS_CHAIN_ID=71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd diff --git a/.env.telostestnet b/.env.telostestnet index 81d117b5..afc29f20 100644 --- a/.env.telostestnet +++ b/.env.telostestnet @@ -71,7 +71,7 @@ REACT_APP_HASURA_URL=http://localhost:8080/v1/graphql REACT_APP_EOS_API_NETWORK_NAME=telos-testnet REACT_APP_EOS_API_NETWORK_LABEL=Telos Testnet REACT_APP_EOS_API_NETWORK_LOGO=https://eosio.online/images/telos.jpg -REACT_APP_EOS_API_HOST=telos-testnet.edenia.cloud +REACT_APP_EOS_API_HOST=testnet.telos.caleos.io:9879 REACT_APP_EOS_API_PORT=443 REACT_APP_EOS_API_PROTOCOL=https REACT_APP_EOS_CHAIN_ID=1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f diff --git a/.env.waxtestnet b/.env.waxtestnet index b0f6c990..fa12afeb 100644 --- a/.env.waxtestnet +++ b/.env.waxtestnet @@ -72,7 +72,7 @@ REACT_APP_HASURA_URL=http://localhost:8080/v1/graphql REACT_APP_EOS_API_NETWORK_NAME=wax-testnet REACT_APP_EOS_API_NETWORK_LABEL=WAX Testnet REACT_APP_EOS_API_NETWORK_LOGO=https://eosio.online/images/wax.jpg -REACT_APP_EOS_API_HOST=testnet.wax.pink.gg +REACT_APP_EOS_API_HOST=api.waxtest.alohaeos.com REACT_APP_EOS_API_PORT=443 REACT_APP_EOS_API_PROTOCOL=https REACT_APP_EOS_CHAIN_ID=f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12 From 53c4c79bc41f26321932859cee371eeeefbc757f Mon Sep 17 00:00:00 2001 From: Fabian Vives Date: Fri, 23 Sep 2022 14:15:53 -0600 Subject: [PATCH 5/6] fix(webapp): changed values on yaml --- .github/workflows/deploy-proton-testnet.yaml | 2 +- .github/workflows/deploy-telos-testnet.yaml | 2 +- .github/workflows/deploy-wax-testnet.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-proton-testnet.yaml b/.github/workflows/deploy-proton-testnet.yaml index bf978fe6..74b79d27 100644 --- a/.github/workflows/deploy-proton-testnet.yaml +++ b/.github/workflows/deploy-proton-testnet.yaml @@ -49,7 +49,7 @@ jobs: REACT_APP_EOS_API_NETWORK_NAME: 'proton-testnet' REACT_APP_EOS_API_NETWORK_LABEL: 'Proton Testnet' REACT_APP_EOS_API_NETWORK_LOGO: 'https://eosio.online/images/proton.png' - REACT_APP_EOS_API_HOST: 'proton-testnet.edenia.cloud' + REACT_APP_EOS_API_HOST: 'test.proton.eosusa.news' REACT_APP_EOS_API_PORT: '443' REACT_APP_EOS_API_PROTOCOL: 'https' REACT_APP_EOS_CHAIN_ID: '71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd' diff --git a/.github/workflows/deploy-telos-testnet.yaml b/.github/workflows/deploy-telos-testnet.yaml index 59012629..a71d1c88 100644 --- a/.github/workflows/deploy-telos-testnet.yaml +++ b/.github/workflows/deploy-telos-testnet.yaml @@ -49,7 +49,7 @@ jobs: REACT_APP_EOS_API_NETWORK_NAME: 'telos-testnet' REACT_APP_EOS_API_NETWORK_LABEL: 'Telos Testnet' REACT_APP_EOS_API_NETWORK_LOGO: 'https://eosio.online/images/telos.jpg' - REACT_APP_EOS_API_HOST: 'telos-testnet.edenia.cloud' + REACT_APP_EOS_API_HOST: 'testnet.telos.caleos.io:9879' REACT_APP_EOS_API_PORT: '443' REACT_APP_EOS_API_PROTOCOL: 'https' REACT_APP_EOS_CHAIN_ID: '1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f' diff --git a/.github/workflows/deploy-wax-testnet.yaml b/.github/workflows/deploy-wax-testnet.yaml index 4fc2561d..129e8987 100644 --- a/.github/workflows/deploy-wax-testnet.yaml +++ b/.github/workflows/deploy-wax-testnet.yaml @@ -49,7 +49,7 @@ jobs: REACT_APP_EOS_API_NETWORK_NAME: 'wax-testnet' REACT_APP_EOS_API_NETWORK_LABEL: 'WAX Testnet' REACT_APP_EOS_API_NETWORK_LOGO: 'https://eosio.online/images/wax.jpg' - REACT_APP_EOS_API_HOST: 'wax-testnet.edenia.cloud' + REACT_APP_EOS_API_HOST: 'api.waxtest.alohaeos.com' REACT_APP_EOS_API_PORT: '443' REACT_APP_EOS_API_PROTOCOL: 'https' REACT_APP_EOS_CHAIN_ID: 'f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12' From ebf23a506c1d2870ba5d7ecc2da83217ca04ae96 Mon Sep 17 00:00:00 2001 From: Fabian Vives Date: Fri, 23 Sep 2022 15:05:55 -0600 Subject: [PATCH 6/6] fix(webapp): added hapi endpoint --- .env.protontestnet | 2 +- .env.telostestnet | 2 +- .env.waxtestnet | 2 +- .github/workflows/deploy-proton-testnet.yaml | 2 +- .github/workflows/deploy-telos-testnet.yaml | 2 +- .github/workflows/deploy-wax-testnet.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.protontestnet b/.env.protontestnet index 7bfebf61..328db018 100644 --- a/.env.protontestnet +++ b/.env.protontestnet @@ -20,7 +20,7 @@ HASURA_GRAPHQL_ACTION_BASE_URL=http://hapi:9090 # hapi HAPI_EOS_API_NETWORK_NAME=proton-testnet -HAPI_EOS_API_ENDPOINT=https://proton-testnet.edenia.cloud +HAPI_EOS_API_ENDPOINT=test.proton.eosusa.news HAPI_EOS_API_CHAIN_ID=71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... diff --git a/.env.telostestnet b/.env.telostestnet index afc29f20..ad2516eb 100644 --- a/.env.telostestnet +++ b/.env.telostestnet @@ -20,7 +20,7 @@ HASURA_GRAPHQL_ACTION_BASE_URL=http://hapi:9090 # hapi HAPI_EOS_API_NETWORK_NAME=telos -HAPI_EOS_API_ENDPOINT=https://telos-testnet.edenia.cloud +HAPI_EOS_API_ENDPOINT=testnet.telos.caleos.io:9879 HAPI_EOS_API_CHAIN_ID=1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f HAPI_EOS_BASE_ACCOUNT=eosmechatero HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... diff --git a/.env.waxtestnet b/.env.waxtestnet index fa12afeb..b066255a 100644 --- a/.env.waxtestnet +++ b/.env.waxtestnet @@ -20,7 +20,7 @@ HASURA_GRAPHQL_ACTION_BASE_URL=http://hapi:9090 # hapi HAPI_EOS_API_NETWORK_NAME=jungle -HAPI_EOS_API_ENDPOINT=https://testnet.wax.pink.gg +HAPI_EOS_API_ENDPOINT=api.waxtest.alohaeos.com HAPI_EOS_API_CHAIN_ID=f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12 HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... diff --git a/.github/workflows/deploy-proton-testnet.yaml b/.github/workflows/deploy-proton-testnet.yaml index 74b79d27..8831f60b 100644 --- a/.github/workflows/deploy-proton-testnet.yaml +++ b/.github/workflows/deploy-proton-testnet.yaml @@ -85,7 +85,7 @@ jobs: POSTGRES_DB: ${{ secrets.POSTGRES_DB }} POSTGRES_DATA: ${{ secrets.POSTGRES_DATA }} # hapi - HAPI_EOS_API_ENDPOINT: https://proton-testnet.edenia.cloud + HAPI_EOS_API_ENDPOINT: test.proton.eosusa.news HAPI_EOS_API_CHAIN_ID: 71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd 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-telos-testnet.yaml b/.github/workflows/deploy-telos-testnet.yaml index a71d1c88..6a645eff 100644 --- a/.github/workflows/deploy-telos-testnet.yaml +++ b/.github/workflows/deploy-telos-testnet.yaml @@ -85,7 +85,7 @@ jobs: POSTGRES_DB: ${{ secrets.POSTGRES_DB }} POSTGRES_DATA: ${{ secrets.POSTGRES_DATA }} # hapi - HAPI_EOS_API_ENDPOINT: https://telos-testnet.edenia.cloud + HAPI_EOS_API_ENDPOINT: testnet.telos.caleos.io:9879 HAPI_EOS_API_CHAIN_ID: 1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f 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-wax-testnet.yaml b/.github/workflows/deploy-wax-testnet.yaml index 129e8987..a839ae7e 100644 --- a/.github/workflows/deploy-wax-testnet.yaml +++ b/.github/workflows/deploy-wax-testnet.yaml @@ -85,7 +85,7 @@ jobs: POSTGRES_DB: ${{ secrets.POSTGRES_DB }} POSTGRES_DATA: ${{ secrets.POSTGRES_DATA }} # hapi - HAPI_EOS_API_ENDPOINT: https://wax-testnet.edenia.cloud + HAPI_EOS_API_ENDPOINT: api.waxtest.alohaeos.com HAPI_EOS_API_CHAIN_ID: f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12 HAPI_EOS_BASE_ACCOUNT: ${{ secrets.HAPI_EOS_BASE_ACCOUNT }} HAPI_EOS_BASE_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_BASE_ACCOUNT_PASSWORD }}