Skip to content

Commit

Permalink
update token list order
Browse files Browse the repository at this point in the history
  • Loading branch information
p6te committed Jan 22, 2025
1 parent d185213 commit 6d8153a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/NewPosition/NewPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export const NewPosition: React.FC<INewPosition> = ({
const updatePath = (address1: PublicKey | null, address2: PublicKey | null, fee: number) => {
if (canNavigate) {
const parsedFee = parseFeeToPathFee(+ALL_FEE_TIERS_DATA[fee].tier.fee)
console.log(+ALL_FEE_TIERS_DATA[fee].tier.fee)

if (address1 != null && address2 != null) {
const token1Symbol = addressToTicker(
network,
Expand Down
15 changes: 10 additions & 5 deletions src/store/consts/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,16 @@ export const SIGNING_SNACKBAR_CONFIG: Omit<ISnackbar, 'open'> = {
persist: true
}

export const ADDRESSES_TO_REVERT_TOKEN_PAIRS: string[] = [
'7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs', //ETH
'So11111111111111111111111111111111111111112', //SOL
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' // USDT
export const ADDRESSES_ORDER_TO_REVERT: string[] = [
'7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs', // ETH
'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v', // JupSOL
'27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4', // JLP
'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So', // mSol
'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn', // JitoSOL
'So11111111111111111111111111111111111111112', // SOL
'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX', // USDH
'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' // USDC
]

export const REFRESHER_INTERVAL = 120
Expand Down
6 changes: 3 additions & 3 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
SUI_MAIN,
WRAPPED_SOL_ADDRESS,
NATIVE_TICK_CROSSES_PER_IX,
ADDRESSES_TO_REVERT_TOKEN_PAIRS
ADDRESSES_ORDER_TO_REVERT
} from '@store/consts/static'
import mainnetList from '@store/consts/tokenLists/mainnet.json'
import { FormatConfig, subNumbers } from '@store/consts/static'
Expand Down Expand Up @@ -1638,8 +1638,8 @@ export const initialXtoY = (tokenXAddress?: string | null, tokenYAddress?: strin
return true
}

const tokenXIndex = ADDRESSES_TO_REVERT_TOKEN_PAIRS.findIndex(token => token === tokenXAddress)
const tokenYIndex = ADDRESSES_TO_REVERT_TOKEN_PAIRS.findIndex(token => token === tokenYAddress)
const tokenXIndex = ADDRESSES_ORDER_TO_REVERT.findIndex(token => token === tokenXAddress)
const tokenYIndex = ADDRESSES_ORDER_TO_REVERT.findIndex(token => token === tokenYAddress)

return tokenXIndex < tokenYIndex
}
Expand Down

0 comments on commit 6d8153a

Please sign in to comment.