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 92dd4ea4..0675fdff 100644 --- a/src/redux/services/partners.ts +++ b/src/redux/services/partners.ts @@ -616,7 +616,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 (