From 498ba0be61488a3e03d94556dedb79221b4bf658 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Mon, 8 Apr 2024 15:56:34 -0700 Subject: [PATCH] fixed manage SubDAOs action not showing SubDAOs to remove that are fake --- .../state/recoil/selectors/contracts/DaoCore.v2.ts | 14 ++++---------- .../core/dao_governance/ManageSubDaos/index.tsx | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/state/recoil/selectors/contracts/DaoCore.v2.ts b/packages/state/recoil/selectors/contracts/DaoCore.v2.ts index 9be87b3569..e66c78a845 100644 --- a/packages/state/recoil/selectors/contracts/DaoCore.v2.ts +++ b/packages/state/recoil/selectors/contracts/DaoCore.v2.ts @@ -1246,10 +1246,10 @@ export const listAllSubDaosSelector = selectorFamily< }) /** - * Get the configs for all this DAO's recognized SubDAOs that this DAO has admin - * power over. These will only be SubDAOs on the same chain. + * Get the configs for all this DAO's recognized SubDAOs. These will only be + * SubDAOs on the same chain. */ -export const allAdministratedSubDaoConfigsSelector = selectorFamily< +export const allSubDaoConfigsSelector = selectorFamily< (WithChainId<{ address: string }> & ConfigResponse)[], QueryClientParams >({ @@ -1257,13 +1257,7 @@ export const allAdministratedSubDaoConfigsSelector = selectorFamily< get: (queryClientParams) => async ({ get }) => { - const subDaos = get( - listAllSubDaosSelector({ - ...queryClientParams, - // Only get SubDAOs this DAO is the admin of. - onlyAdmin: true, - }) - ) + const subDaos = get(listAllSubDaosSelector(queryClientParams)) const subDaoConfigs = get( waitForAll( subDaos.map(({ chainId, addr }) => diff --git a/packages/stateful/actions/core/dao_governance/ManageSubDaos/index.tsx b/packages/stateful/actions/core/dao_governance/ManageSubDaos/index.tsx index 88a2a4e2c0..5a877c0a70 100644 --- a/packages/stateful/actions/core/dao_governance/ManageSubDaos/index.tsx +++ b/packages/stateful/actions/core/dao_governance/ManageSubDaos/index.tsx @@ -38,7 +38,7 @@ const Component: ActionComponent = (props) => { } = useActionOptions() const currentSubDaos = useRecoilValue( - DaoCoreV2Selectors.allAdministratedSubDaoConfigsSelector({ + DaoCoreV2Selectors.allSubDaoConfigsSelector({ chainId, contractAddress: address, })