Skip to content

Commit

Permalink
fixed manage SubDAOs action not showing SubDAOs to remove that are fake
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Apr 8, 2024
1 parent 90c061d commit 498ba0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions packages/state/recoil/selectors/contracts/DaoCore.v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1246,24 +1246,18 @@ 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
>({
key: 'daoCoreV2AllSubDaoConfigs',
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 }) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Component: ActionComponent = (props) => {
} = useActionOptions()

const currentSubDaos = useRecoilValue(
DaoCoreV2Selectors.allAdministratedSubDaoConfigsSelector({
DaoCoreV2Selectors.allSubDaoConfigsSelector({
chainId,
contractAddress: address,
})
Expand Down

0 comments on commit 498ba0b

Please sign in to comment.