diff --git a/skale-network b/skale-network index 3dd97b8..676c221 160000 --- a/skale-network +++ b/skale-network @@ -1 +1 @@ -Subproject commit 3dd97b8c4af21af8077a20346ee63d8360e830ae +Subproject commit 676c2213b917f48a759c61ebe34be3520ece239f diff --git a/src/components/Chain.tsx b/src/components/Chain.tsx index 2ae10eb..7dc0118 100644 --- a/src/components/Chain.tsx +++ b/src/components/Chain.tsx @@ -35,8 +35,10 @@ export default function Chain(props: { app?: string size?: Size decIcon?: boolean + prim?: boolean }) { const size = props.size ?? 'sm' + const prim = props.prim ?? true return (
{getChainAlias(props.skaleNetwork, props.chainName, props.app)} diff --git a/src/components/ChainApps.tsx b/src/components/ChainApps.tsx index 9b6a199..0dce9f5 100644 --- a/src/components/ChainApps.tsx +++ b/src/components/ChainApps.tsx @@ -11,7 +11,8 @@ export default function ChainApps(props: { skaleNetwork: SkaleNetwork chainName: string handle?: (schainName: string, app?: string) => void - size?: 'sm' | 'md' + size?: 'sm' | 'md', + prim?: boolean }) { const apps = getChainAppsMeta(props.chainName, props.skaleNetwork) if (!apps || !Object.keys(apps) || Object.keys(apps).length === 0) return
@@ -19,6 +20,8 @@ export default function ChainApps(props: { const size = props.size ?? 'sm' const iconSize = props.size === 'sm' ? 'xs' : 'sm' + const prim = props.prim ?? size === 'md' + return (
@@ -55,8 +58,8 @@ export default function ChainApps(props: { cmn.p, [cmn.p3, size === 'md'], [cmn.p4, size === 'sm'], - [cmn.pSec, size === 'sm'], - [cmn.pPrim, size === 'md'], + [cmn.pSec, !prim], + [cmn.pPrim, prim], cmn.p600, cmn.mleft10 )} @@ -66,8 +69,8 @@ export default function ChainApps(props: {
(_: React.SyntheticEvent, isExpanded: boolean) => { props.setExpanded(isExpanded ? panel : false) @@ -134,9 +137,32 @@ export default function ChainsList(props: { cmn.fullWidth )} > - +
- + {props.destChains && !props.destChains?.includes(name) ? ( + + + + ) : null} +
@@ -145,6 +171,7 @@ export default function ChainsList(props: { chainName={name} handle={handle} size={size} + prim={props.destChains?.includes(name)} />
diff --git a/src/components/Debug.tsx b/src/components/Debug.tsx index baabde8..bb11565 100644 --- a/src/components/Debug.tsx +++ b/src/components/Debug.tsx @@ -37,6 +37,7 @@ import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded' import CloseRoundedIcon from '@mui/icons-material/CloseRounded' import ExpandRoundedIcon from '@mui/icons-material/ExpandRounded' +import { useCPStore } from '../store/CommunityPoolStore' import { useMetaportStore } from '../store/MetaportStore' import { cls, cmn, styles } from '../core/css' import { ActionStateUpdate } from '../core/interfaces' @@ -99,7 +100,7 @@ export default function Debug() { const { queue, enqueue, empty } = useQueue() - const { queue: queueAction, enqueue: enqueueAction, empty: emptyAction } = useQueue(); + const { queue: queueAction, enqueue: enqueueAction, empty: emptyAction } = useQueue() const [expanded, setExpanded] = useState(false) @@ -114,12 +115,15 @@ export default function Debug() { const tokenContracts = useMetaportStore((state) => state.tokenContracts) const tokens = useMetaportStore((state) => state.tokens) + const cpData = useCPStore((state) => state.cpData) + const getRows = () => [ { name: 'chainName1', value: chainName1 }, { name: 'chainName2', value: chainName2 }, { name: 'token', value: JSON.stringify(token) }, { name: 'tokenBalances', value: stringifyBigInt(tokenBalances) }, { name: 'destTokenBalance', value: stringifyBigInt(destTokenBalance) }, + { name: 'cpData', value: stringifyBigInt(cpData) }, { name: 'tokenContracts', value: @@ -137,7 +141,6 @@ export default function Debug() { window.addEventListener('metaport_actionStateUpdated', actionStateUpdated, false) }, []) - function actionStateUpdated(e: CustomEvent) { const actionStateUpdate: ActionStateUpdate = e.detail enqueueAction({ @@ -172,7 +175,8 @@ export default function Debug() { tokenBalances, destTokenBalance, tokenContracts, - tokens + tokens, + cpData ]) return ( diff --git a/src/components/TokenListSection.tsx b/src/components/TokenListSection.tsx index fcf8d70..9fbc87e 100644 --- a/src/components/TokenListSection.tsx +++ b/src/components/TokenListSection.tsx @@ -31,7 +31,7 @@ export default function TokenListSection(props: { > {props.type}

- {Object.keys(props.tokens).map((key, _) => ( + {Object.keys(props.tokens).sort().map((key, _) => (