diff --git a/src/layout/PartnersLayout.tsx b/src/layout/PartnersLayout.tsx index 447a215b..a69e6b7a 100644 --- a/src/layout/PartnersLayout.tsx +++ b/src/layout/PartnersLayout.tsx @@ -93,6 +93,7 @@ const PartnersLayout = () => { refetchPartenrData() } }, [activeNetwork]) + const auth = useAppSelector(state => state.appConfig.isAuth) useEffect(() => { if ( walletName && @@ -103,6 +104,10 @@ const PartnersLayout = () => { } }, [walletName]) + useEffect(() => { + if (!auth && path.includes('partners/messenger-configuration')) navigate('/login') + }, [auth, path]) + const partnerCChainAddress = useMemo(() => { let cAddress = data?.attributes?.cChainAddresses.find( elem => elem.Network === activeNetwork?.name?.toLowerCase(), diff --git a/src/redux/services/partners.ts b/src/redux/services/partners.ts index 1ea146a9..b27d53f6 100644 --- a/src/redux/services/partners.ts +++ b/src/redux/services/partners.ts @@ -577,7 +577,7 @@ export const partnersApi = createApi({ const { supportedServices, wantedServices, bots, supportedCurrencies } = await fetchContractServices(contractAddress, provider) let parsedSupportedServices = [] - if (supportedServices) { + if (supportedServices[0]) { parsedSupportedServices = supportedServices[0] .map((service, index) => { if (