From a6f0d0238b4b0c38d8a31c7d5f717036d6795132 Mon Sep 17 00:00:00 2001 From: AngeloCG97 <51149817+AngeloCG97@users.noreply.github.com> Date: Tue, 12 Oct 2021 18:15:45 -0600 Subject: [PATCH 1/2] fix(front-end): add validation to load data (#837) * fix(front-end): add validation to load data --- webapp/src/routes/BlockProducers/BlockProducerProfile.js | 2 +- webapp/src/routes/BlockProducers/BlockProducerRate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/routes/BlockProducers/BlockProducerProfile.js b/webapp/src/routes/BlockProducers/BlockProducerProfile.js index 739fc1b1..2dae4ff0 100644 --- a/webapp/src/routes/BlockProducers/BlockProducerProfile.js +++ b/webapp/src/routes/BlockProducers/BlockProducerProfile.js @@ -96,7 +96,7 @@ const BlockProducerProfile = () => { const setProfileData = bp => { const userDataSet = getBPRadarData({ name: t('edenRates'), - parameters: getRatingData(bp.edenRate) + parameters: getRatingData(bp?.edenRate) }) setBpHasInformation(!!Object.values(bp.bpjson).length) diff --git a/webapp/src/routes/BlockProducers/BlockProducerRate.js b/webapp/src/routes/BlockProducers/BlockProducerRate.js index b0a808ff..71bd756f 100644 --- a/webapp/src/routes/BlockProducers/BlockProducerRate.js +++ b/webapp/src/routes/BlockProducers/BlockProducerRate.js @@ -269,7 +269,7 @@ const BlockProducerRate = () => { if (bp) { const edenDataSet = getBPRadarData({ name: t('edenRates'), - parameters: getSavedRatingData(bp.edenRate) + parameters: getSavedRatingData(bp?.edenRate) }) setBlockProducerTitle( From f144b22aa35c15de0fd16684e6c82dc7865e8940 Mon Sep 17 00:00:00 2001 From: AngeloCG97 <51149817+AngeloCG97@users.noreply.github.com> Date: Wed, 13 Oct 2021 10:33:33 -0600 Subject: [PATCH 2/2] fix(webapp): fix can't vote (#838) * Publish changes to prod (#566) * avoid statefulsets update errors on actions runs refs #535. (#536) * deprecate demux service. refs #538 (#540) * add handler url from env var & other minor bug fixes (#542) * Add missing env var to config map (#543) * add handler url from env var & other minor bug fixes * add missing env var * fix: update some env vars * fix: update some env vars * fix: replace .env values with the previous ones * Feat/add tx link (#545) * feat: add tx link * feat: remove secrets * setup env workflow (#546) * wip * wip: add env files & db_data to .gitignore * fix: remove .env files * fix: remove .env files * fix: delete unnecessary code * refactor: remove unnecessary code * fix: minimal * Fix/rate action buttons not showing (#547) * wip * wip: add env files & db_data to .gitignore * fix: remove .env files * fix: remove .env files * fix: delete unnecessary code * refactor: remove unnecessary code * fix: minimal * fix: rate buttons not showing in certains densities * Fix/hasura console config (#556) * Deploy to mainnet (#544) * avoid statefulsets update errors on actions runs refs #535. (#536) * deprecate demux service. refs #538 (#540) * add handler url from env var & other minor bug fixes (#542) * Add missing env var to config map (#543) * add handler url from env var & other minor bug fixes * add missing env var * fix: update some env vars * fix: update some env vars * fix: replace .env values with the previous ones Co-authored-by: Andres Gomez Co-authored-by: JustinCast * wip * wip: add env files & db_data to .gitignore * fix: remove .env files * fix: remove .env files * fix: delete unnecessary code * refactor: remove unnecessary code * fix: minimal * feat: voting tool revamp * fix: remove comments * fix: add i18n entries * fix: bug fixes * fix: hasura console config Co-authored-by: Xavier <5632966+xavier506@users.noreply.github.com> Co-authored-by: Andres Gomez * Fix/add missing i18n entries (#554) * Deploy to mainnet (#544) * avoid statefulsets update errors on actions runs refs #535. (#536) * deprecate demux service. refs #538 (#540) * add handler url from env var & other minor bug fixes (#542) * Add missing env var to config map (#543) * add handler url from env var & other minor bug fixes * add missing env var * fix: update some env vars * fix: update some env vars * fix: replace .env values with the previous ones Co-authored-by: Andres Gomez Co-authored-by: JustinCast * wip * wip: add env files & db_data to .gitignore * fix: remove .env files * fix: remove .env files * fix: delete unnecessary code * refactor: remove unnecessary code * fix: minimal * feat: voting tool revamp * fix: remove comments * fix: add i18n entries * fix: bug fixes Co-authored-by: Xavier <5632966+xavier506@users.noreply.github.com> Co-authored-by: Andres Gomez * docs: add env example (#565) * fix: not able to sync proxies locally (#564) * fix: update hasura version * fix: hasura version && other minor bug fixes * Fix/update hasura version (#567) * fix: remove build:staging statement * latest changes Co-authored-by: Andres Gomez Co-authored-by: JustinCast * Update push-master-environment.yaml (#576) * fix(cron): update config values (#579) * Revert "fix(cron): update config values (#579)" (#580) This reverts commit 13ecf78f0cec5c1a938a1ee0aee646828995d940. * add(link sidebar): Add network Monitor in sidebar * fix(front-end): add validation to load data * fix(webapp): validate data on volting tool * fix(webapp): delete unnecesary code Co-authored-by: Xavier <5632966+xavier506@users.noreply.github.com> Co-authored-by: Andres Gomez Co-authored-by: JustinCast Co-authored-by: Xavier Fernandez --- webapp/src/components/BpChipAvatar/index.js | 6 +++--- webapp/src/components/CompareTool/CompareGraphView.js | 4 ++-- webapp/src/routes/BlockProducers/index.js | 1 - webapp/src/routes/Proxies/index.js | 2 -- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/webapp/src/components/BpChipAvatar/index.js b/webapp/src/components/BpChipAvatar/index.js index facedd10..a0831a26 100644 --- a/webapp/src/components/BpChipAvatar/index.js +++ b/webapp/src/components/BpChipAvatar/index.js @@ -35,7 +35,7 @@ const ProducerChipAvatar = ({ )} } - label={data.owner} + label={data?.owner} /> )} {!isProxy && ( @@ -50,8 +50,8 @@ const ProducerChipAvatar = ({ )} } - onDelete={() => onHandleRemove(data.owner)} - label={data.owner} + onDelete={() => onHandleRemove(data?.owner)} + label={data?.owner} /> )} diff --git a/webapp/src/components/CompareTool/CompareGraphView.js b/webapp/src/components/CompareTool/CompareGraphView.js index e5663e09..811b9d4a 100644 --- a/webapp/src/components/CompareTool/CompareGraphView.js +++ b/webapp/src/components/CompareTool/CompareGraphView.js @@ -53,7 +53,7 @@ const CompareBodyList = ({ isProxy, selectedData, classes, removeBP }) => { onHandleRemove={removeBP} classNames={classes} imageURL={_get(data, 'bpjson.org.branding.logo_256', null)} - key={`data-list-name-${data.owner}`} + key={`data-list-name-${data?.owner}`} defaultName='BP' /> ))} @@ -134,7 +134,7 @@ const CompareGraphView = ({ - ({ ...data }))} /> + ({ data: bp?.data?.data }))} /> {isProxy && selected.length > 0 && ( diff --git a/webapp/src/routes/BlockProducers/index.js b/webapp/src/routes/BlockProducers/index.js index c783a3ea..951c4c11 100644 --- a/webapp/src/routes/BlockProducers/index.js +++ b/webapp/src/routes/BlockProducers/index.js @@ -55,7 +55,6 @@ const AllBps = () => { const handleToggleSelected = (item, isAddItem = false) => { if (isAddItem) { setSelectedProducers([...state.selectedProducers, item]) - console.log({ selectedProducers: state?.selectedProducers }) } else { const removeSelected = state.selectedProducers.filter( bpName => bpName !== item diff --git a/webapp/src/routes/Proxies/index.js b/webapp/src/routes/Proxies/index.js index fb05445e..9cb41377 100644 --- a/webapp/src/routes/Proxies/index.js +++ b/webapp/src/routes/Proxies/index.js @@ -47,8 +47,6 @@ const AllProxies = ({ ual = {} }) => { } const handleOpenDesktopVotingTool = (isAdding, producerAccountName) => { - console.log({ isAdding, producerAccountName }) - setSelectedProxies([producerAccountName]) setCompareProxyTool(true) }