Skip to content

Commit

Permalink
fix: mint form data display
Browse files Browse the repository at this point in the history
  • Loading branch information
chalabi2 committed Nov 26, 2024
1 parent 86d57e6 commit 9171c00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
39 changes: 6 additions & 33 deletions components/factory/forms/MintForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { TailwindModal } from '@/components/react/modal';

export default function MintForm({
isAdmin,
admin,
denom,
address,
refetch,
Expand All @@ -23,7 +22,6 @@ export default function MintForm({
onMultiMintClick,
}: Readonly<{
isAdmin: boolean;
admin: string;
denom: ExtendedMetadataSDKType;
address: string;
refetch: () => void;
Expand Down Expand Up @@ -104,44 +102,19 @@ export default function MintForm({
</p>
</div>
</div>

<div>
<p className="text-sm font-light text-gray-500 dark:text-gray-400 mb-2">
YOUR BALANCE
<p className="text-sm font-light text-gray-500 truncate dark:text-gray-400 mb-2">
CIRCULATING SUPPLY
</p>
<div className="bg-base-300 p-4 rounded-md">
<p className="font-semibold text-md text-black truncate dark:text-white">
{Number(shiftDigits(balance, -exponent)).toLocaleString(undefined, {
<p className="font-semibold text-md truncate text-black dark:text-white">
{Number(shiftDigits(totalSupply, -exponent)).toLocaleString(undefined, {
maximumFractionDigits: exponent,
})}
})}{' '}
</p>
</div>
</div>
{denom?.denom_units[1]?.exponent && (
<div>
<p className="text-sm font-light text-gray-500 dark:text-gray-400 mb-2">
EXPONENT
</p>
<div className="bg-base-300 p-4 rounded-md">
<p className="font-semibold text-md text-black dark:text-white">
{denom?.denom_units[1]?.exponent}
</p>
</div>
</div>
)}
{totalSupply !== '0' && (
<div>
<p className="text-sm font-light text-gray-500 truncate dark:text-gray-400 mb-2">
CIRCULATING SUPPLY
</p>
<div className="bg-base-300 p-4 rounded-md">
<p className="font-semibold text-md truncate text-black dark:text-white">
{Number(shiftDigits(totalSupply, -exponent)).toLocaleString(undefined, {
maximumFractionDigits: exponent,
})}{' '}
</p>
</div>
</div>
)}
</div>
{!denom.base.includes('umfx') && (
<Formik
Expand Down
1 change: 0 additions & 1 deletion components/factory/modals/MintModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function MintModal({
) : (
<MintForm
isAdmin={isAdmin ?? false}
admin={admin}
balance={safeBalance}
totalSupply={safeTotalSupply}
refetch={refetch}
Expand Down

0 comments on commit 9171c00

Please sign in to comment.