File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
ui/shared/AppActionButton Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11import { useMemo } from 'react' ;
22
3+ import config from 'configs/app' ;
34import useAddressMetadataInfoQuery from 'lib/address/useAddressMetadataInfoQuery' ;
45
56export 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 ;
You can’t perform that action at this time.
0 commit comments