Skip to content

Commit 5499ab4

Browse files
committed
Merge remote-tracking branch 'origin/master' into chore/refactor-chakra-text
# Conflicts: # src/components/swap/components/warning.tsx # src/components/swap/index.tsx
2 parents c8b830a + 8a4ba3c commit 5499ab4

File tree

5 files changed

+79
-50
lines changed

5 files changed

+79
-50
lines changed

src/app/leverage/components/faq-section/index.tsx

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ export function FaqSection() {
103103
tracking error, volatility drift, rebalancing overheads as well as
104104
costs and fees compounding over time.
105105
</p>
106+
<p>
107+
What is volatility Drift?
108+
<ul className='list-disc pl-6'>
109+
<li>
110+
Volatility drift (sometimes called &quot;volatility decay&quot;)
111+
is the compounding effect on leveraged products that causes their
112+
returns to deviate from the underlying asset&apos;s
113+
performance—beyond what a simple multiplication by the leverage
114+
factor would suggest. In the context of our tokens, periodic
115+
adjustments to maintain the respective token&apos;s target
116+
leverage ratio can magnify price swings, leading to drift. For a
117+
deeper look, check out our deep dive on{' '}
118+
<a
119+
target='_blank'
120+
href='https://indexcoop.com/blog/fli-volatility-drift'
121+
className='underline'
122+
>
123+
volatility drift
124+
</a>
125+
.
126+
</li>
127+
</ul>
128+
</p>
106129
<p>
107130
Users should frequently monitor their token holdings and take time to
108131
fully understand how the products work and are expected to behave in
@@ -225,22 +248,30 @@ export function FaqSection() {
225248
charged for trading using the Leverage Interface.
226249
</p>
227250
</FaqItem>
228-
<FaqItem question='What is volatility drift?' id='faq-volatility-drift'>
229-
Volatility drift (sometimes called &quot;volatility decay&quot;) is the
230-
compounding effect on leveraged products that causes their returns to
231-
deviate from the underlying asset&apos;s performance—beyond what a
232-
simple multiplication by the leverage factor would suggest. In the
233-
context of our tokens, periodic adjustments to maintain the respective
234-
token&apos;s target leverage ratio can magnify price swings, leading to
235-
drift. For a deeper look, check out our{' '}
236-
<a
237-
target='_blank'
238-
href='https://indexcoop.com/blog/fli-volatility-drift'
239-
className='underline'
240-
>
241-
deep dive on volatility drift
242-
</a>
243-
.
251+
<FaqItem
252+
question='How can I trade SOL or SUI if I’m on an EVM chain?'
253+
id='trade-sol-sui-evm'
254+
>
255+
<p>
256+
Our new SOL and SUI tokens make it possible to trade these tokens on
257+
Base with no bridging required. We do this by partnering with&nbsp;
258+
<a
259+
href='https://www.universal.xyz/reserves'
260+
target='_blank'
261+
className='underline'
262+
>
263+
Universal
264+
</a>
265+
, which wraps native SOL or SUI into an EVM-friendly token (uSOL /
266+
uSUI).
267+
</p>
268+
<p>
269+
These wrapped tokens are fully backed by the underlying assets, so you
270+
can hold them just like any other ERC-20 token. From there, we create
271+
the leveraged version with the same process we use for all Index Coop
272+
leverage tokens. The result? Real SOL and SUI exposure from the
273+
comfort of your favorite L2.
274+
</p>
244275
</FaqItem>
245276
<FaqItem
246277
question='Why do I see a “Not available for Restricted Persons” message?'

src/components/swap/components/select-token-modal.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
Image,
32
Modal,
43
ModalBody,
54
ModalCloseButton,
@@ -8,6 +7,7 @@ import {
87
ModalOverlay,
98
} from '@chakra-ui/react'
109
import clsx from 'clsx'
10+
import Image from 'next/image'
1111
import { useMemo } from 'react'
1212
import { arbitrum, base } from 'viem/chains'
1313

@@ -121,19 +121,18 @@ const TokenItem = ({
121121
<div className='flex items-center'>
122122
<div className='relative inline-block h-11 w-11'>
123123
<Image
124-
className='h-10 w-10'
125124
alt={`${item.symbol} logo`}
126125
src={item.image}
127-
w='40px'
128-
h='40px'
126+
width={40}
127+
height={40}
129128
/>
130129
{networkAsset && (
131130
<div className='bg-ic-gray-100 absolute bottom-0 right-0 h-5 w-5 rounded-full'>
132131
<Image
133132
alt={`${item.symbol} logo`}
134133
src={networkAsset}
135-
w='20px'
136-
h='20px'
134+
width={20}
135+
height={20}
137136
/>
138137
</div>
139138
)}

src/components/swap/components/trade-details/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
AccordionIcon,
55
AccordionItem,
66
AccordionPanel,
7-
Box,
87
Flex,
98
} from '@chakra-ui/react'
109
import { ExclamationTriangleIcon } from '@heroicons/react/20/solid'
@@ -95,7 +94,7 @@ export const TradeDetails = (props: TradeDetailsProps) => {
9594
height={16}
9695
/>
9796
)}
98-
<Box onClick={onToggleTokenPrice}>
97+
<div onClick={onToggleTokenPrice}>
9998
{isLoading ? (
10099
<StyledSkeleton width={200} />
101100
) : (
@@ -104,7 +103,7 @@ export const TradeDetails = (props: TradeDetailsProps) => {
104103
usdLabel={usdLabel}
105104
/>
106105
)}
107-
</Box>
106+
</div>
108107
</Flex>
109108
<div className={cn('flex gap-4', isExpanded && 'hidden')}>
110109
{!isLoading &&

src/components/swap/components/warning.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Link } from '@chakra-ui/react'
1+
import { Flex } from '@chakra-ui/react'
22
import { ExclamationCircleIcon } from '@heroicons/react/20/solid'
33
import { ReactNode } from 'react'
44

@@ -30,19 +30,21 @@ const warningsData: Record<
3030
<>
3131
Some of our tokens are not available to Restricted Persons - including
3232
US persons - as defined in our{' '}
33-
<Link
33+
<a
3434
href='https://indexcoop.com/terms-of-service'
35-
style={{ textDecoration: 'underline' }}
35+
className='underline'
36+
target='_blank'
3637
>
3738
Terms of Service
38-
</Link>
39+
</a>
3940
. Please also see our{' '}
40-
<Link
41+
<a
4142
href='https://indexcoop.com/tokens-restricted-for-restricted-persons'
42-
style={{ textDecoration: 'underline' }}
43+
className='underline'
44+
target='_blank'
4345
>
4446
Tokens Restricted for Restricted Persons
45-
</Link>{' '}
47+
</a>{' '}
4648
page.
4749
</>
4850
),
@@ -54,19 +56,21 @@ const warningsData: Record<
5456
It appears you may be using a VPN and, because some of our tokens are
5557
not available to Restricted Persons - including US persons - as defined
5658
in our{' '}
57-
<Link
59+
<a
5860
href='https://indexcoop.com/terms-of-service'
59-
style={{ textDecoration: 'underline' }}
61+
className='underline'
62+
target='_blank'
6063
>
6164
Terms of Service
62-
</Link>
65+
</a>
6366
, we are required to restrict access to VPN users. Please also see our{' '}
64-
<Link
67+
<a
6568
href='https://indexcoop.com/tokens-restricted-for-restricted-persons'
66-
style={{ textDecoration: 'underline' }}
69+
className='underline'
70+
target='_blank'
6771
>
6872
Tokens Restricted for Restricted Persons
69-
</Link>{' '}
73+
</a>{' '}
7074
page.
7175
</>
7276
),
@@ -108,19 +112,15 @@ export const WarningCompProtection = () => {
108112
MEV Protection
109113
</p>
110114
</Flex>
111-
<p className='text-ic-gray-600 mt-2 text-xs'>
115+
<p className='text-ic-gray-600 mt-2 text-xs font-normal'>
112116
It is highly recommended to use an MEV protected RPC.{' '}
113-
<Link onClick={onClick} style={{ textDecoration: 'underline' }}>
117+
<span onClick={onClick} className='cursor-pointer underline'>
114118
Click here
115-
</Link>{' '}
119+
</span>{' '}
116120
to add the MEV Blocker network to your wallet.{' '}
117-
<Link
118-
href='https://mevblocker.io/'
119-
isExternal
120-
style={{ textDecoration: 'underline' }}
121-
>
121+
<a href='https://mevblocker.io/' target='_blank' className='underline'>
122122
Learn More about MEV protection
123-
</Link>
123+
</a>
124124
</p>
125125
</Flex>
126126
)

src/components/swap/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Flex, IconButton } from '@chakra-ui/react'
1+
import { Flex, IconButton } from '@chakra-ui/react'
22
import { ChevronUpDownIcon } from '@heroicons/react/20/solid'
33
import { useCallback, useEffect, useState } from 'react'
44
import { useDebounce } from 'use-debounce'
@@ -215,15 +215,15 @@ export const Swap = (props: SwapProps) => {
215215
if (inputTokenslist.length > 1) onOpenSelectInputToken()
216216
}}
217217
/>
218-
<Box h='6px' alignSelf={'center'}>
218+
<div className='flex h-1.5 self-center'>
219219
<IconButton
220220
className='bg-ic-white text-ic-gray-400'
221221
margin={'-16px 0 0 0'}
222222
aria-label='switch input/output tokens'
223223
icon={<ChevronUpDownIcon className='h-7 w-5 text-gray-500' />}
224224
onClick={onSwitchTokens}
225225
/>
226-
</Box>
226+
</div>
227227
<TradeOutput
228228
caption={'You receive'}
229229
selectedToken={outputToken}

0 commit comments

Comments
 (0)