Skip to content

Commit

Permalink
disable mint button if telegram is not authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
bshevchenko committed Jun 11, 2024
1 parent 959b209 commit 10b271a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/nextjs/components/MintAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const MintAccounts = ({ up, isMyProfile }: { up: string; isMyProfile: boo
};

const renderModalContent = (item: any) => {
const account = providers.find(account => account.title === item.title);
const account = providers.find(account => account.name === item.name);
let step1Contents;
if (!item.isCustom) {
step1Contents = item.step1Contents.replace("{up}", up);
Expand Down Expand Up @@ -306,7 +306,10 @@ export const MintAccounts = ({ up, isMyProfile }: { up: string; isMyProfile: boo
<button
className="btn btn-primary"
onClick={() => handleMint(item.name, "", id)}
disabled={isMinting && isMinting[item.name as keyof typeof isMinting]}
disabled={
(isMinting && isMinting[item.name as keyof typeof isMinting]) ||
(!isAuthenticatedTelegram && account?.name == "telegram")
}
>
{isMinting && isMinting[item.name as keyof typeof isMinting] ? (
<>{isSigning[item.name as keyof typeof isSigning] ? "Signing..." : "Minting..."}</>
Expand Down

0 comments on commit 10b271a

Please sign in to comment.