Skip to content

Commit 695a536

Browse files
authored
chore: update market names (#2280)
1 parent f73b2cd commit 695a536

File tree

5 files changed

+111
-45
lines changed

5 files changed

+111
-45
lines changed

src/components/MarketSwitcher.tsx

Lines changed: 99 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ export const MarketSwitcher = () => {
133133
setCurrentMarket(e.target.value as unknown as CustomMarket);
134134
};
135135

136+
const marketBlurbs: { [key: string]: JSX.Element } = {
137+
proto_mainnet_v3: (
138+
<Trans>Main Ethereum market with the largest selection of assets and yield options</Trans>
139+
),
140+
proto_lido_v3: (
141+
<Trans>Optimized for efficiency and risk by supporting blue-chip collateral assets</Trans>
142+
),
143+
};
144+
136145
return (
137146
<TextField
138147
select
@@ -149,60 +158,105 @@ export const MarketSwitcher = () => {
149158
SelectProps={{
150159
native: false,
151160
className: 'MarketSwitcher__select',
152-
IconComponent: (props) => (
153-
<SvgIcon fontSize="medium" {...props}>
154-
<ChevronDownIcon />
155-
</SvgIcon>
156-
),
161+
IconComponent: () => null,
157162
renderValue: (marketId) => {
158163
const { market, logo } = getMarketInfoById(marketId as CustomMarket);
159164

160165
return (
161-
<Box sx={{ display: 'flex', alignItems: 'center' }}>
162-
<MarketLogo
163-
size={upToLG ? 32 : 28}
164-
logo={logo}
165-
testChainName={getMarketHelpData(market.marketTitle).testChainName}
166-
/>
167-
<Box sx={{ mr: 1, display: 'inline-flex', alignItems: 'flex-start' }}>
166+
<Box>
167+
{/* Main Row with Market Name */}
168+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
169+
<MarketLogo
170+
size={upToLG ? 32 : 28}
171+
logo={logo}
172+
testChainName={getMarketHelpData(market.marketTitle).testChainName}
173+
/>
174+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
175+
<Typography
176+
variant={upToLG ? 'display1' : 'h1'}
177+
sx={{
178+
fontSize: downToXSM ? '1.55rem' : undefined,
179+
color: 'common.white',
180+
mr: 1,
181+
}}
182+
>
183+
{getMarketHelpData(market.marketTitle).name} {market.isFork ? 'Fork' : ''}
184+
{upToLG &&
185+
(currentMarket === 'proto_mainnet_v3' || currentMarket === 'proto_lido_v3')
186+
? 'Instance'
187+
: ' Market'}
188+
</Typography>
189+
{market.v3 ? (
190+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
191+
<Box
192+
sx={{
193+
color: '#fff',
194+
px: 2,
195+
borderRadius: '12px',
196+
background: (theme) => theme.palette.gradients.aaveGradient,
197+
display: 'flex',
198+
alignItems: 'center',
199+
}}
200+
>
201+
<Typography variant="subheader2">V3</Typography>
202+
</Box>
203+
<SvgIcon
204+
fontSize="medium"
205+
sx={{
206+
ml: 1,
207+
color: '#F1F1F3',
208+
}}
209+
>
210+
<ChevronDownIcon />
211+
</SvgIcon>
212+
</Box>
213+
) : (
214+
<Box sx={{ display: 'flex', alignItems: 'center' }}>
215+
<Box
216+
sx={{
217+
color: '#A5A8B6',
218+
px: 2,
219+
borderRadius: '12px',
220+
backgroundColor: '#383D51',
221+
display: 'flex',
222+
alignItems: 'center',
223+
}}
224+
>
225+
<Typography variant="subheader2">V2</Typography>
226+
</Box>
227+
<SvgIcon
228+
fontSize="medium"
229+
sx={{
230+
ml: 1,
231+
color: '#F1F1F3',
232+
}}
233+
>
234+
<ChevronDownIcon />
235+
</SvgIcon>
236+
</Box>
237+
)}
238+
</Box>
239+
</Box>
240+
241+
{marketBlurbs[currentMarket] && (
168242
<Typography
169-
variant={upToLG ? 'display1' : 'h1'}
170243
sx={{
171-
fontSize: downToXSM ? '1.55rem' : undefined,
172244
color: 'common.white',
173-
mr: 1,
245+
mt: 0.5,
246+
fontSize: '0.85rem',
247+
wordWrap: 'break-word',
248+
whiteSpace: 'normal',
249+
lineHeight: 1.3,
250+
maxWidth: '100%',
174251
}}
175252
>
176-
{getMarketHelpData(market.marketTitle).name} {market.isFork ? 'Fork' : ''}
177-
{upToLG && ' Market'}
253+
{marketBlurbs[currentMarket]}
178254
</Typography>
179-
{market.v3 ? (
180-
<Box
181-
sx={{
182-
color: '#fff',
183-
px: 2,
184-
borderRadius: '12px',
185-
background: (theme) => theme.palette.gradients.aaveGradient,
186-
}}
187-
>
188-
<Typography variant="subheader2">V3</Typography>
189-
</Box>
190-
) : (
191-
<Box
192-
sx={{
193-
color: '#A5A8B6',
194-
px: 2,
195-
borderRadius: '12px',
196-
backgroundColor: '#383D51',
197-
}}
198-
>
199-
<Typography variant="subheader2">V2</Typography>
200-
</Box>
201-
)}
202-
</Box>
255+
)}
203256
</Box>
204257
);
205258
},
259+
206260
sx: {
207261
'&.MarketSwitcher__select .MuiSelect-outlined': {
208262
pl: 0,
@@ -216,6 +270,10 @@ export const MarketSwitcher = () => {
216270
vertical: 'bottom',
217271
horizontal: 'right',
218272
},
273+
transformOrigin: {
274+
vertical: 'top',
275+
horizontal: 'right',
276+
},
219277
PaperProps: {
220278
style: {
221279
minWidth: 240,

src/hooks/useMeritIncentives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
9696
customForumLink:
9797
'https://governance.aave.com/t/arfc-pyusd-reserve-configuration-update-incentive-campaign/19573',
9898
customMessage:
99-
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.'
99+
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.',
100100
},
101101
],
102102
},

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,10 @@ msgstr "MAI has been paused due to a community decision. Supply, borrows and rep
14601460
msgid "MAX"
14611461
msgstr "MAX"
14621462

1463+
#: src/components/MarketSwitcher.tsx
1464+
msgid "Main Ethereum market with the largest selection of assets and yield options"
1465+
msgstr "Main Ethereum market with the largest selection of assets and yield options"
1466+
14631467
#: src/components/transactions/Emode/EmodeModalContent.tsx
14641468
#: src/modules/dashboard/DashboardEModeButton.tsx
14651469
msgid "Manage E-Mode"
@@ -1740,6 +1744,10 @@ msgstr "Ok, Close"
17401744
msgid "Operation not supported"
17411745
msgstr "Operation not supported"
17421746

1747+
#: src/components/MarketSwitcher.tsx
1748+
msgid "Optimized for efficiency and risk by supporting blue-chip collateral assets"
1749+
msgstr "Optimized for efficiency and risk by supporting blue-chip collateral assets"
1750+
17431751
#: src/modules/reserve-overview/ReserveTopDetails.tsx
17441752
msgid "Oracle price"
17451753
msgstr "Oracle price"

src/ui-config/marketsConfig.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const marketsData: {
107107
[key in keyof typeof CustomMarket]: MarketDataType;
108108
} = {
109109
[CustomMarket.proto_mainnet_v3]: {
110-
marketTitle: 'Ethereum',
110+
marketTitle: 'Core',
111111
market: CustomMarket.proto_mainnet_v3,
112112
chainId: ChainId.mainnet,
113113
v3: true,
@@ -139,7 +139,7 @@ export const marketsData: {
139139
},
140140
},
141141
[CustomMarket.proto_lido_v3]: {
142-
marketTitle: 'Lido',
142+
marketTitle: 'Prime',
143143
market: CustomMarket.proto_lido_v3,
144144
chainId: ChainId.mainnet,
145145
v3: true,

0 commit comments

Comments
 (0)