Skip to content

Commit

Permalink
Merge pull request #271 from jediswaplabs/retroboy/fixes
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
retroboydev authored Mar 1, 2024
2 parents e3539e6 + 73d64f5 commit b8aa46e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ export const WBTC = {
)
}

export const STRK = {
[ChainId.SN_MAIN]: new Token(
ChainId.SN_MAIN,
'0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d',
18,
'STRK',
'Starknet',
'https://static.jediswap.xyz/tokens-list/assets/STRK.png'
)
}

export const wstETH = {
[ChainId.SN_GOERLI]: new Token(
ChainId.SN_GOERLI,
Expand Down Expand Up @@ -174,7 +185,8 @@ export const BASES_TO_TRACK_LIQUIDITY_FOR: ChainTokenList = {
USDC[ChainId.SN_MAIN],
USDT[ChainId.SN_MAIN],
WBTC[ChainId.SN_MAIN],
wstETH[ChainId.SN_MAIN]
wstETH[ChainId.SN_MAIN],
STRK[ChainId.SN_MAIN]
]
}

Expand Down
1 change: 0 additions & 1 deletion src/pages/Pool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default function Pool() {

// fetch the user's balances of all tracked V2 LP tokens
const trackedTokenPairs = useTrackedTokenPairs()

const tokenPairsWithLiquidityTokens = useMemo(
() => trackedTokenPairs.map(tokens => ({ liquidityToken: getLiquidityToken(tokens), tokens })),
[trackedTokenPairs]
Expand Down
5 changes: 3 additions & 2 deletions src/state/user/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,14 @@ export function useTrackedTokenPairs(): [Token, Token][] {
return [base, token]
}
})
.filter((p): p is [Token, Token] => p !== null)
.filter((p): p is [Token, Token] => {
return p !== null
})
)
})
: [],
[tokens, chainId]
)

// pairs saved by users
const savedSerializedPairs = useSelector<AppState, AppState['user']['pairs']>(({ user: { pairs } }) => pairs)

Expand Down

0 comments on commit b8aa46e

Please sign in to comment.