Skip to content

Commit 7ee6b2a

Browse files
authored
don't show action button for internal dapp if marketplace is disabled (#3143)
1 parent 5fcb8af commit 7ee6b2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/shared/AppActionButton/useAppActionData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { useMemo } from 'react';
22

3+
import config from 'configs/app';
34
import useAddressMetadataInfoQuery from 'lib/address/useAddressMetadataInfoQuery';
45

56
export default function useAppActionData(address: string | undefined = '', isEnabled = true) {
67
const memoizedArray = useMemo(() => address ? [ address ] : [], [ address ]);
78
const { data } = useAddressMetadataInfoQuery(memoizedArray, isEnabled);
89
const metadata = data?.addresses[address?.toLowerCase()];
910
const tag = metadata?.tags?.find(({ tagType }) => tagType === 'protocol');
10-
if (tag?.meta?.appMarketplaceURL || tag?.meta?.appID) {
11+
if (tag?.meta?.appMarketplaceURL || (config.features.marketplace.isEnabled && tag?.meta?.appID)) {
1112
return tag.meta;
1213
}
1314
return null;

0 commit comments

Comments
 (0)