diff --git a/src/app/components/ActionsBackground.tsx b/src/app/components/ActionsBackground.tsx index ad25ceed5..99815d07e 100644 --- a/src/app/components/ActionsBackground.tsx +++ b/src/app/components/ActionsBackground.tsx @@ -4,11 +4,11 @@ import styles from "./ActionsBackground.module.scss" const ActionsBackground = () => { const { name } = useTheme() - if (name === "light" || name === "whale") { - return <>> + if (name === "moon") { + return
} - return + return <>> } export default ActionsBackground diff --git a/src/app/sections/DisplayChainsSetting.tsx b/src/app/sections/DisplayChainsSetting.tsx index a7e2aeb58..81bbdae83 100644 --- a/src/app/sections/DisplayChainsSetting.tsx +++ b/src/app/sections/DisplayChainsSetting.tsx @@ -14,9 +14,9 @@ const DisplayChainsSetting = () => { const onChange = (value: string) => { if (isTerraChain(value)) return - const newDisplayChains = displayChains.includes(value) - ? displayChains.filter((chainID) => chainID !== value) - : [...displayChains, value] + const newDisplayChains = displayChains?.includes(value) + ? displayChains?.filter((chainID) => chainID !== value) + : [...(displayChains || []), value] changeDisplayChains(newDisplayChains) if (value === selectedDisplayChain) { changeSelectedDisplayChain(undefined) @@ -42,7 +42,7 @@ const DisplayChainsSetting = () => { ) .map((chainID) => ({ value: chainID, - selected: displayChains.includes(chainID), + selected: displayChains?.includes(chainID), label: network[chainID].name, icon: network[chainID].icon, })) diff --git a/src/app/sections/LCDSetting.tsx b/src/app/sections/LCDSetting.tsx index caad30c6a..cf9c24a85 100644 --- a/src/app/sections/LCDSetting.tsx +++ b/src/app/sections/LCDSetting.tsx @@ -3,7 +3,7 @@ import { useForm } from "react-hook-form" import { Form, FormItem, Input } from "components/form" import { useTranslation } from "react-i18next" import { useNetworks } from "app/InitNetworks" -import ChainSelector from "components/form/ChainSelector" +import ChainSelector from "components/form/Selectors/ChainSelector/ChainSelector" import { useEffect, useMemo, useState } from "react" import { Button } from "components/general" import styles from "./LCDSetting.module.scss" diff --git a/src/components/form/Selectors/AssetSelector/AssetList.tsx b/src/components/form/Selectors/AssetSelector/AssetList.tsx new file mode 100644 index 000000000..c798330b7 --- /dev/null +++ b/src/components/form/Selectors/AssetSelector/AssetList.tsx @@ -0,0 +1,60 @@ +import styles from "../../ChainSelector.module.scss" +import WithSearchInput from "pages/custom/WithSearchInput" +import classNames from "classnames" + +interface AssetType { + denom: string + balance: string + icon: string + symbol: string + price: number + chains: string[] +} + +interface Props { + list: AssetType[] + onChange: (symbol: string, index: number) => void + value: string + small?: boolean + noSearch?: boolean +} + +const ChainList = ({ list, onChange, value, small, noSearch }: Props) => { + return ( +