From 466f3be45fbf8857e2c35ae496c96696ded3bcbe Mon Sep 17 00:00:00 2001 From: AngeloCG97 <51149817+AngeloCG97@users.noreply.github.com> Date: Thu, 9 Sep 2021 16:00:32 -0600 Subject: [PATCH] fix(user-model): change 'is eden member' request (#770) * 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(user-data): fix lost user data * fix(rating): fix rating acction * fix(voting-tool): align elements * fix(db): missing eden ratings migration * feat(bp-profile): show bp eden rating * fix(rating): fix bug when user do rating * fix(content): change console message * fix(user-model): change 'is eden member' request 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/models/User/user.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/models/User/user.js b/webapp/src/models/User/user.js index a744f03a..7e3f348c 100644 --- a/webapp/src/models/User/user.js +++ b/webapp/src/models/User/user.js @@ -39,23 +39,23 @@ const user = { let userRates = [] let edenMember = false const rpc = getRpc(ual) + if (accountName.length) { account = await rpc.get_account(accountName) - const { rows: edenMenbers } = await rpc.get_table_rows({ + const { rows: edenMembers } = await rpc.get_table_rows({ json: true, code: contractEden, scope: 0, table: 'member', + lower_bound: accountName, + limit: 1, reverse: false, show_payer: false }) - for (const member of edenMenbers) { - if (accountName === member[1].account) { - edenMember = true - break - } + if (edenMembers[0][1].account === accountName) { + edenMember = true } }