Skip to content

Commit

Permalink
Merge pull request #921 from eoscostarica/dev
Browse files Browse the repository at this point in the history
Production release
  • Loading branch information
xavier506 authored Sep 24, 2022
2 parents 3f5d323 + 9c23c9a commit 33c3ccd
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .env.protontestnet
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .env.telostestnet
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .env.waxtestnet
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-proton-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-telos-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-wax-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion hapi/src/services/eosio.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const getProducerHealthStatus = (bpJson) => {

healthStatus.push({
name: 'bpJson',
valid: !!bpJson
valid: !!bpJson && !!Object.keys(bpJson).length
})
healthStatus.push({
name: 'organization_name',
Expand Down
2 changes: 1 addition & 1 deletion hapi/src/utils/axios.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/InformationCard/Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Nodes = ({ nodes, producer, onNodeClick, t, type, classes }) => {
{nodes.map((node, i) => (
<div className={classes.rowWrapper} key={`node-${i}`}>
<Typography variant="body1">
{node.name || node.node_type.toString()}{' '}
{node.name || node?.node_type?.toString()}{' '}
</Typography>
<InfoOutlinedIcon onClick={onNodeClick({ node, producer })} />
</div>
Expand Down
17 changes: 13 additions & 4 deletions webapp/src/hooks/customHooks/useNodeState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33c3ccd

Please sign in to comment.