Skip to content

Commit

Permalink
handle pre-listed token pages
Browse files Browse the repository at this point in the history
  • Loading branch information
saml33 committed Feb 1, 2024
1 parent 64b1c68 commit bc1a7f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 6 additions & 2 deletions app/components/explore/token-page/TokenMangoStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ const TokenMangoStats = ({
(market) => market.name.split('/')[1] === 'USDC',
)
}
return (
return Object.keys(mangoData)?.length === 0 ? (
<div className="p-6 border border-th-bkg-3 rounded-xl flex items-center justify-center">
<p>{`${tokenPageData?.tokenName} will be listed on Mango soon.`}</p>
</div>
) : (
<>
<div className="grid grid-cols-3 gap-6">
<div className="col-span-3 sm:col-span-1">
Expand Down Expand Up @@ -105,7 +109,7 @@ const TokenMangoStats = ({
<KeyValuePairDisplay
label="Available"
value={
<span>
<span className={isNaN(+available) ? 'text-th-fgd-4' : ''}>
{available}{' '}
<span className="text-sm text-th-fgd-4">${availableValue}</span>
</span>
Expand Down
1 change: 0 additions & 1 deletion app/utils/etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const fetchEthCircSupply = async (mint: string, decimals: number) => {
const etherscanData = await fetchEtherscanData(mint)
if (etherscanData?.message === 'OK') {
const nativeSupply = etherscanData.result
console.log(nativeSupply)
const circSupply = calculateCirculatingSupply(nativeSupply, decimals)
return circSupply
} else {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit bc1a7f8

Please sign in to comment.