diff --git a/public/images/tokens/atom.svg b/public/images/tokens/atom.svg index ed377e8b..9db9255b 100644 --- a/public/images/tokens/atom.svg +++ b/public/images/tokens/atom.svg @@ -1,44 +1,30 @@ - - cosmos-atom-logo - - - - - - - - - + + + + + + + + + + diff --git a/public/images/tokens/statom.svg b/public/images/tokens/statom.svg index 73781bbe..80c18af9 100644 --- a/public/images/tokens/statom.svg +++ b/public/images/tokens/statom.svg @@ -1,38 +1,40 @@ - - - - + + + + diff --git a/public/images/tokens/stosmo.svg b/public/images/tokens/stosmo.svg new file mode 100644 index 00000000..71dc7c77 --- /dev/null +++ b/public/images/tokens/stosmo.svg @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/public/images/tokens/tia.svg b/public/images/tokens/tia.svg new file mode 100644 index 00000000..77b969e8 --- /dev/null +++ b/public/images/tokens/tia.svg @@ -0,0 +1,55 @@ + + + + diff --git a/src/api/prices/getMarsPrice.ts b/src/api/prices/getMarsPrice.ts index f9eb3656..906ad8df 100644 --- a/src/api/prices/getMarsPrice.ts +++ b/src/api/prices/getMarsPrice.ts @@ -1,13 +1,10 @@ -import { ASSETS, MARS_MAINNET_DENOM } from 'constants/assets' -import { bySymbol } from 'utils/array' import getPoolPrice from 'api/prices/getPoolPrice' +import { ASSETS } from 'constants/assets' +import { bySymbol } from 'utils/array' async function getMarsPrice() { - const marsAsset = { - ...(ASSETS.find(bySymbol('MARS')) as Asset), - denom: MARS_MAINNET_DENOM, - } - + const marsAsset = ASSETS.find(bySymbol('MARS')) + if (!marsAsset) return 0 return await getPoolPrice(marsAsset) } diff --git a/src/api/prices/getPoolPrice.ts b/src/api/prices/getPoolPrice.ts index 22913890..6481d6b5 100644 --- a/src/api/prices/getPoolPrice.ts +++ b/src/api/prices/getPoolPrice.ts @@ -41,7 +41,21 @@ const getAssetRate = async (asset: Asset) => { `poolPrices/${(asset.poolId || 0).toString()}`, 60, ) - return calculateSpotPrice(response.pool.pool_assets, asset) + const pool = response.pool + const poolAssets: PoolAsset[] = pool.scaling_factor_controller + ? [ + { + token: pool.pool_liquidity[0], + weight: 1, + }, + { + token: pool.pool_liquidity[1], + weight: 1, + }, + ] + : pool.pool_assets + + return calculateSpotPrice(poolAssets, asset) } const calculateSpotPrice = (poolAssets: PoolAsset[], asset: Asset): [BigNumber, PoolAsset] => { diff --git a/src/components/HLS/Staking/Table/Columns/Manage.tsx b/src/components/HLS/Staking/Table/Columns/Manage.tsx index ca4c3c85..640b230a 100644 --- a/src/components/HLS/Staking/Table/Columns/Manage.tsx +++ b/src/components/HLS/Staking/Table/Columns/Manage.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react' +import { useCallback, useMemo } from 'react' import DropDownButton from 'components/Button/DropDownButton' import { ArrowDownLine, Cross, HandCoins, Plus, Scale } from 'components/Icons' @@ -61,7 +61,7 @@ export default function Manage(props: Props) { onClick: () => closeHlsStakingPosition({ accountId: props.account.id, actions }), }, ], - [actions, closeHlsStakingPosition, openModal, props.account.id], + [actions, closeHlsStakingPosition, openModal, props.account.id, hasNoDebt], ) return diff --git a/src/components/Header/DesktopHeader.tsx b/src/components/Header/DesktopHeader.tsx index eabc3462..ba6be5a5 100644 --- a/src/components/Header/DesktopHeader.tsx +++ b/src/components/Header/DesktopHeader.tsx @@ -36,7 +36,7 @@ export default function DesktopHeader() { return (
{assetOverlayState !== 'closed' && (
useStore.setState({ assetOverlayState: 'closed' })} role='button' /> diff --git a/src/types/interfaces/asset.d.ts b/src/types/interfaces/asset.d.ts index d2426d5c..67afa00f 100644 --- a/src/types/interfaces/asset.d.ts +++ b/src/types/interfaces/asset.d.ts @@ -2,13 +2,14 @@ interface Asset { color: string name: string denom: string - mainnetDenom: string symbol: | 'OSMO' | 'ATOM' | 'MARS' | 'stATOM' + | 'stOSMO' | 'AXL' + | 'TIA' | 'USDC.axl' | 'USDC' | 'WBTC.axl' @@ -25,7 +26,9 @@ interface Asset { | 'ATOM' | 'MARS' | 'stATOM' + | 'stOSMO' | 'AXL' + | 'TIA' | 'axlUSDC' | 'axlWBTC' | 'axlWETH'