Skip to content

Commit

Permalink
rm connect app filter by address
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibz-Mysten committed Jun 22, 2023
1 parent b0ce9c6 commit 063c24e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useFeature } from '@growthbook/growthbook-react';
import cl from 'classnames';
import { useEffect, useMemo } from 'react';

import { useActiveAddress } from '../../hooks/useActiveAddress';
import { useBackgroundClient } from '../../hooks/useBackgroundClient';
import { permissionsSelectors } from '../../redux/slices/permissions';
import Loading from '../loading';
Expand All @@ -29,11 +28,10 @@ function ConnectedDapps() {
const ecosystemApps = useFeature<DAppEntry[]>(FEATURES.WALLET_DAPPS).value ?? emptyArray;
const loading = useAppSelector(({ permissions }) => !permissions.initialized);
const allPermissions = useAppSelector(permissionsSelectors.selectAll);
const activeAddress = useActiveAddress();
const connectedApps = useMemo(
() =>
allPermissions
.filter(({ allowed, accounts }) => allowed && accounts.includes(activeAddress!))
.filter(({ allowed, accounts }) => allowed)
.map((aPermission) => {
const matchedEcosystemApp = ecosystemApps.find((anEcosystemApp) => {
const originAdj = prepareLinkToCompare(aPermission.origin);
Expand Down Expand Up @@ -62,7 +60,7 @@ function ConnectedDapps() {
permissionID: aPermission.id,
};
}),
[activeAddress, allPermissions, ecosystemApps],
[allPermissions, ecosystemApps],
);
return (
<Loading loading={loading}>
Expand Down

0 comments on commit 063c24e

Please sign in to comment.