Skip to content

Commit

Permalink
chore : update deps
Browse files Browse the repository at this point in the history
 && hardcode decimal for asset for now
  • Loading branch information
nick134-bit committed Aug 16, 2024
1 parent 6b8c2c9 commit 7a16f68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/AssetInput/AssetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const AssetList: FC<AssetListProps> = ({
isIncentives = false,
unbondingBalances = null,
}) => {
const [tokenList] = useTokenList()
const [tokenList, setup] = useTokenList()
const { network, chainId } = useRecoilValue(chainState)
const config = useConfig(network, chainId)
const tokens = useMemo(() => {
Expand All @@ -42,7 +42,7 @@ const AssetList: FC<AssetListProps> = ({
let res = isBonding ? config.bonding_tokens : [...(tokenList?.tokensBySymbol?.values() || [])];

return res.length > 0 ? res : [...(tokenList?.tokensBySymbol?.values() || [])].filter((token: any) => !token?.fromRegistry && !token?.withoutPool);
}, [config, isBonding, isIncentives, tokenList]);
}, [config, isBonding, isIncentives, tokenList, setup]);

const [tokenBalance = []] =
unbondingBalances
Expand Down
6 changes: 5 additions & 1 deletion hooks/useTokenList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ export const useTokenList = () => {
if (asset.name === 'Whale Token' && !native && walletChainName === 'terra'){
continue
}
const denom = !native ? asset.address : asset.base
const denom = native ? asset.base : asset.address || asset.base
const logoURI = asset.logo_URIs?.svg || asset.logo_URIs?.png || asset.images[0].svg || asset.images[0].png
// HARDCODED FOR NOW
if (asset.name == "DRUGS" && walletChainName === 'injective') {
exponents.exponent = 18
}
let tmpAssetOBJ: any = { denom: denom, id: asset.coingecko_id || "", token_address: asset.address || asset.base, chain_id: chainId, symbol: asset.symbol, decimals: exponents.exponent, name: asset.name, logoURI: logoURI, tags: native ? ['native'] : [''], native: native, fromRegistry: true }
const res = Array.from(tokenMapBySymbol.values())
if (denom && !res.find((token) => token.denom === denom)) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"@cosmos-kit/station": "^2.7.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@injectivelabs/sdk-ts": "1.14.7",
"@injectivelabs/sdk-ts": "1.14.13",
"@next/bundle-analyzer": "^14.2.3",
"@nick134-bit/nicks-injectivejs": "^0.0.3",
"@tanstack/react-table": "^8.16.0",
"@terra-money/feather.js": "^2.0.4",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"bignumber.js": "^9.1.2",
"chain-registry": "^1.62.3",
"chain-registry": "^1.63.61",
"dayjs": "^1.11.11",
"eslint-plugin-import-helpers": "^1.3.1",
"intercept-stdout": "^0.1.2",
Expand Down

0 comments on commit 7a16f68

Please sign in to comment.