From bce746f41d6226bd9f6a7c889b6601dd55a5e424 Mon Sep 17 00:00:00 2001 From: Cheslav Zhuravsky Date: Fri, 26 Jul 2024 14:30:37 +0700 Subject: [PATCH 1/5] remove line height --- src/components/TextMarkdown/styles.module.scss | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/TextMarkdown/styles.module.scss b/src/components/TextMarkdown/styles.module.scss index 5fd4da081..faa67083e 100644 --- a/src/components/TextMarkdown/styles.module.scss +++ b/src/components/TextMarkdown/styles.module.scss @@ -28,10 +28,8 @@ .markdownContainer { margin: 0 auto; - width: clamp(320px, 100%, 580px); min-height: 200px; - display: flex; justify-content: center; flex-direction: column; @@ -51,7 +49,7 @@ margin-left: 20px; } - @media (max-width: 680px) { + @media (width <= 680px) { width: unset; } } @@ -71,7 +69,6 @@ .markdownContainer p { margin-bottom: 20px; - line-height: 23px; &:last-child { margin-bottom: 0; @@ -99,7 +96,7 @@ border: 0; th { - border-bottom: 1px solid rgba(255, 255, 255, 0.5); + border-bottom: 1px solid rgb(255 255 255 / 50%); border-collapse: separate; border-spacing: 5px 5px; } @@ -120,7 +117,7 @@ } p:last-child { - margin-bottom: 0px; + margin-bottom: 0; font-size: 16px; } From bdaf91df21cff9ecf2fea09269d63b1072f36930 Mon Sep 17 00:00:00 2001 From: Cheslav Zhuravsky Date: Sat, 27 Jul 2024 10:18:26 +0700 Subject: [PATCH 2/5] remove key --- src/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 1efe73e1c..336d1f415 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -46,6 +46,7 @@ import HubProvider from './contexts/hub'; import { INDEX_HTTPS, INDEX_WEBSOCKET } from './constants/config'; import ScriptingProvider from './contexts/scripting/scripting'; +import { localStorageKeys } from './constants/localStorageKeys'; const httpLink = new HttpLink({ uri: INDEX_HTTPS, @@ -99,6 +100,9 @@ if (container === null) { const root = createRoot(container); +// temp +localStorage.removeItem(localStorageKeys.settings.adviserAudio); + function Providers({ children }: { children: React.ReactNode }) { return ( From 6604557a881cee65847f1f8cb7f01276f85a9c64 Mon Sep 17 00:00:00 2001 From: Cheslav Zhuravsky Date: Sat, 27 Jul 2024 10:35:00 +0700 Subject: [PATCH 3/5] fix adviser z-index --- src/features/adviser/AdviserContainer.module.scss | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/features/adviser/AdviserContainer.module.scss b/src/features/adviser/AdviserContainer.module.scss index b4cbf4b2e..743842e33 100644 --- a/src/features/adviser/AdviserContainer.module.scss +++ b/src/features/adviser/AdviserContainer.module.scss @@ -2,21 +2,14 @@ position: sticky; top: 80px; width: 60%; - - z-index: 3; + z-index: 4; min-height: 60px; // 2 lines of text - - margin-top: -45px; - margin-bottom: 25px; - margin-left: auto; - margin-right: auto; - + margin: -45px auto 25px; display: flex; justify-content: center; - @media (max-width: 540px) { + @media (width <= 540px) { margin-top: unset; - } } @@ -32,7 +25,6 @@ width: 100%; height: 110%; left: 0; - filter: blur(12px); } } From f4c62c39e9f5fd175726af2ef29934b58424b0b3 Mon Sep 17 00:00:00 2001 From: Cheslav Zhuravsky Date: Sat, 27 Jul 2024 16:03:58 +0700 Subject: [PATCH 4/5] change brain link --- src/layouts/Main.tsx | 21 +++++++++++---------- src/routes.ts | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/layouts/Main.tsx b/src/layouts/Main.tsx index a1e64476c..96ae3877b 100644 --- a/src/layouts/Main.tsx +++ b/src/layouts/Main.tsx @@ -12,6 +12,7 @@ import { Link } from 'react-router-dom'; import CircularMenu from 'src/components/appMenu/CircularMenu/CircularMenu'; import TimeHistory from 'src/features/TimeHistory/TimeHistory'; import MobileMenu from 'src/components/appMenu/MobileMenu/MobileMenu'; +import useCurrentAddress from 'src/hooks/useCurrentAddress'; import graphDataPrepared from '../pages/oracle/landing/graphDataPrepared.json'; import stylesOracle from '../pages/oracle/landing/OracleLanding.module.scss'; import SenseButton from '../features/sense/ui/SenseButton/SenseButton'; @@ -21,6 +22,8 @@ import SideHydrogenBtn from './ui/SideHydrogenBtn/SideHydrogenBtn'; function MainLayout({ children }: { children: JSX.Element }) { const { defaultAccount } = useAppSelector(({ pocket }) => pocket); const addressBech32 = defaultAccount.account?.cyber.bech32; + + const currentAddress = useCurrentAddress(); const { viewportWidth } = useDevice(); const ref = useRef(null); const dispatch = useAppDispatch(); @@ -50,6 +53,10 @@ function MainLayout({ children }: { children: JSX.Element }) { ref.current.style.setProperty('--graph-size', `${graphSize}px`); }, [ref, graphSize]); + const link = currentAddress + ? routes.robot.routes.brain.path + : routes.brain.path; + return (
@@ -62,16 +69,13 @@ function MainLayout({ children }: { children: JSX.Element }) { {isMobile ? : } {!isMobile && ( - {/* */} + // className={stylesOracle.enlargeBtn} + // title="open full graph" + > {isRenderGraph && ( )} - {/* */} -
{!isMobile && }
- {/* contacts */}
); diff --git a/src/routes.ts b/src/routes.ts index 750b8b2e7..04a1da56b 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -45,6 +45,9 @@ export const routes = { energy: { path: '/robot/energy', }, + brain: { + path: '/robot/brain', + }, }, }, robotPassport: { From 3fdafba77d19e607e913cad8ab06f2d09a38ea73 Mon Sep 17 00:00:00 2001 From: Cheslav Zhuravsky Date: Sat, 27 Jul 2024 16:05:55 +0700 Subject: [PATCH 5/5] skip pussy balance request --- src/containers/sigma/hooks/utils.js | 9 ++++++--- src/utils/chains/pussy.ts | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/utils/chains/pussy.ts diff --git a/src/containers/sigma/hooks/utils.js b/src/containers/sigma/hooks/utils.js index 7f43a99cf..d62ff7a4b 100644 --- a/src/containers/sigma/hooks/utils.js +++ b/src/containers/sigma/hooks/utils.js @@ -4,11 +4,13 @@ import BigNumber from 'bignumber.js'; import { useQuery } from '@tanstack/react-query'; import { getDelegatorDelegations } from 'src/utils/search/utils'; import { BECH32_PREFIX_VALOPER, BASE_DENOM } from 'src/constants/config'; -import { fromBech32 } from '../../../utils/utils'; import { useStake as useVerseStake } from 'src/features/cybernet/ui/hooks/useCurrentAccountStake'; import { CYBERVER_CONTRACTS } from 'src/features/cybernet/constants'; import { useQueryClient } from 'src/contexts/queryClient'; +import { isPussyChain } from 'src/utils/chains/pussy'; +import { fromBech32 } from '../../../utils/utils'; + const initValue = { denom: BASE_DENOM, amount: '0', @@ -76,17 +78,18 @@ const getCommissionAmount = (data) => { }; function useCyberverBalance({ address }) { + const skip = !address || !isPussyChain; // will be refactored to loop const s1 = useVerseStake({ address, contractAddress: CYBERVER_CONTRACTS[0], - skip: !address, + skip, }); const s2 = useVerseStake({ address, contractAddress: CYBERVER_CONTRACTS[1], - skip: !address, + skip, }); const total1 = s1.data?.reduce((acc, { stake }) => acc + stake, 0) || 0; diff --git a/src/utils/chains/pussy.ts b/src/utils/chains/pussy.ts new file mode 100644 index 000000000..78e670660 --- /dev/null +++ b/src/utils/chains/pussy.ts @@ -0,0 +1,4 @@ +import { CHAIN_ID } from 'src/constants/config'; +import { Networks } from 'src/types/networks'; + +export const isPussyChain = CHAIN_ID === Networks.SPACE_PUSSY;