From 51ffc98a972859e76a3b3941a060ec460fcaa52d Mon Sep 17 00:00:00 2001 From: saml33 Date: Fri, 11 Oct 2024 14:58:30 +1100 Subject: [PATCH] market select fixes --- components/trade/MarketSelectDropdown.tsx | 57 +++++++++++++++-------- public/icons/stepsol.svg | 38 +++++++++++++++ utils/constants.ts | 1 + 3 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 public/icons/stepsol.svg diff --git a/components/trade/MarketSelectDropdown.tsx b/components/trade/MarketSelectDropdown.tsx index cca20b32..87e3a4df 100644 --- a/components/trade/MarketSelectDropdown.tsx +++ b/components/trade/MarketSelectDropdown.tsx @@ -9,7 +9,14 @@ import useMangoGroup from 'hooks/useMangoGroup' import useSelectedMarket from 'hooks/useSelectedMarket' import { useTranslation } from 'next-i18next' import Link from 'next/link' -import { ChangeEvent, useEffect, useMemo, useRef, useState } from 'react' +import { + ChangeEvent, + ReactNode, + useEffect, + useMemo, + useRef, + useState, +} from 'react' import { countLeadingZeros, floorToDecimal, @@ -42,14 +49,25 @@ import { isBankVisibleForUser } from 'utils/bank' import Decimal from 'decimal.js' import useMangoAccount from 'hooks/useMangoAccount' import { GRADIENT_TEXT } from '@components/explore/SpotTable' +import Select from '@components/forms/Select' +import Image from 'next/image' type Currencies = { - [key: string]: string + [key: string]: string | ReactNode } export const CURRENCY_SYMBOLS: Currencies = { 'wBTC (Portal)': '₿', SOL: '◎', + stepSOL: ( + stepSOL Logo + ), } const MARKET_LINK_CLASSES = @@ -204,7 +222,7 @@ const MarketSelectDropdown = () => { } ml-2 mt-0.5 h-6 w-6 shrink-0 text-th-fgd-2`} /> - +
{ fillWidth />
-
+
{spotOrPerp === 'perp' && perpMarketsToShow.length ? ( <>
@@ -342,8 +360,8 @@ const MarketSelectDropdown = () => { ) : null} {spotOrPerp === 'spot' ? ( <> -
-
+
+
{
- {spotQuoteTokens.map((tab) => ( - - ))} +
diff --git a/public/icons/stepsol.svg b/public/icons/stepsol.svg new file mode 100644 index 00000000..acc39ca3 --- /dev/null +++ b/public/icons/stepsol.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/constants.ts b/utils/constants.ts index b5616a90..e05fe123 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -206,6 +206,7 @@ export const CUSTOM_TOKEN_ICONS: { [key: string]: boolean } = { slerf: true, sol: true, step: true, + stepsol: true, stsol: true, tbtc: true, tnsr: true,