Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/images/chainNew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 70 additions & 55 deletions src/components/NetworkSelectionDropdown/NetworkSelectionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ChainId } from '@uniswap/sdk';
import { useIsSupportedNetwork } from 'utils';
import KavaImage from 'assets/images/KAVA.png';
import FlareImage from 'assets/images/flare.webp';
import ChainNewImage from 'assets/images/chainNew.png';
import { useArcxAnalytics } from '@arcxmoney/analytics';
import CustomTabSwitch from 'components/v3/CustomTabSwitch';
import ActiveDotImage from 'assets/images/chainActiveDot.png';
Expand Down Expand Up @@ -80,65 +81,79 @@ const NetworkSelectionDropdown: React.FC<{
height={40}
/>
</Box>
{supportedChains.map((chain) => {
const config = getConfig(chain);
return (
<Box
className='networkItemWrapper'
key={chain}
onClick={() => {
switchNetworkFunction(chain);
}}
>
<Box className='flex items-center'>
<img
src={config['nativeCurrencyImage']}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>{config['networkName']}</small>
<Box className='networkItemContainer'>
{supportedChains.map((chain) => {
const config = getConfig(chain);
return (
<Box
className='networkItemWrapper'
key={chain}
onClick={() => {
switchNetworkFunction(chain);
}}
>
<Box className='flex items-center'>
<img
src={config['nativeCurrencyImage']}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>{config['networkName']}</small>
{config['isNew'] && (
<img
src={ChainNewImage}
alt='chain new'
width={48}
height={16}
style={{ marginLeft: 8 }}
/>
)}
</Box>
{isSupportedNetwork && chainId && chainId === chain && (
<img
src={ActiveDotImage}
alt='chain active'
width={12}
height={12}
/>
)}
</Box>
{isSupportedNetwork && chainId && chainId === chain && (
<img
src={ActiveDotImage}
alt='chain active'
width={12}
height={12}
/>
)}
</Box>
);
})}
);
})}
</Box>
{networkType === 'mainnet' && (
<>
<Box
className='networkItemWrapper'
onClick={() => {
window.open('https://kinetix.finance/home', '_blank');
}}
>
<Box className='flex items-center'>
<img
src={KavaImage}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>Kava - Kinetix</small>
<p className='mt-1 mb-1'>Partners</p>
<Box className='networkItemContainer'>
<Box
className='networkItemWrapper'
onClick={() => {
window.open('https://kinetix.finance/home', '_blank');
}}
>
<Box className='flex items-center'>
<img
src={KavaImage}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>Kava - Kinetix</small>
</Box>
</Box>
</Box>
<Box
className='networkItemWrapper'
onClick={() => {
window.open('https://sparkdex.ai/apps/swap', '_blank');
}}
>
<Box className='flex items-center'>
<img
src={FlareImage}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>Flare - SparkDex</small>
<Box
className='networkItemWrapper'
onClick={() => {
window.open('https://sparkdex.ai/apps/swap', '_blank');
}}
>
<Box className='flex items-center'>
<img
src={FlareImage}
alt='network Image'
className='networkIcon'
/>
<small className='weight-600'>Flare - SparkDex</small>
</Box>
</Box>
</Box>
</>
Expand Down
9 changes: 8 additions & 1 deletion src/components/styles/NetworkSelectionDropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
position: absolute;
right: 0;
top: 50px;
width: 320px;
width: 360px;
border: 1px solid $grey38;
border-radius: 16px;
padding: 16px;
Expand Down Expand Up @@ -35,6 +35,13 @@
}
}

.networkItemContainer {
display: grid;
grid-auto-flow: column;
grid-template-rows: repeat(5, auto);
gap: 10px; /* Spacing between items */
}

.networkItemWrapper {
height: 48px;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/config/imx.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"rpc": "https://rpc.immutable.com",
"blockExplorer": "https://explorer.immutable.com",
"bridgeUrl": "https://toolkit.immutable.com/bridge/",
"networkName": "Immutable zkEVM Mainnet",
"networkName": "Immutable zkEVM",
"aprAPINetwork": "imx",
"chainId": 13371,
"isMainnet": true,
Expand Down
2 changes: 1 addition & 1 deletion src/config/manta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"rpc": "https://pacific-rpc.manta.network/http",
"blockExplorer": "https://pacific-explorer.manta.network",
"bridgeUrl": "https://pacific-bridge.manta.network/",
"networkName": "Manta Pacific L2 Rollup",
"networkName": "Manta",
"aprAPINetwork": "manta",
"chainId": 169,
"isMainnet": true,
Expand Down
1 change: 1 addition & 0 deletions src/config/soneium.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"chainId": 1868,
"isMainnet": true,
"visible": true,
"isNew": true,
"networkName": "Soneium",
"nativeCurrencyImage": "/soneium.jpg",
"nativeCurrency": {
Expand Down
14 changes: 7 additions & 7 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,21 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [

export const SUPPORTED_CHAINIDS = [
ChainId.MATIC,
ChainId.ZKEVM,
ChainId.MANTA,
ChainId.SONEIUM,
ChainId.IMX,
ChainId.ZKEVM,
ChainId.LAYERX,
ChainId.DOGECHAIN,
ChainId.ETHEREUM,
ChainId.IMX,
ChainId.DOGECHAIN,
ChainId.ASTARZKEVM,
ChainId.ZKATANA,
ChainId.TIMX,
ChainId.ZKTESTNET,
ChainId.MINATO,
ChainId.MUMBAI,
ChainId.X1,
ChainId.ZKTESTNET,
ChainId.DOEGCHAIN_TESTNET,
ChainId.MINATO,
ChainId.SONEIUM,
ChainId.TIMX,
];

export interface GammaPair {
Expand Down
4 changes: 4 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ wcm-modal {
margin-top: 1rem;
}

.mb-1 {
margin-bottom: 1rem;
}

.ml-1 {
margin-left: 1rem;
}
Expand Down