Skip to content

Commit

Permalink
Merge pull request #487 from projectNEWM/STUD-50_Correct-irrelevant-w…
Browse files Browse the repository at this point in the history
…arning-boxes-visible-in-Minting-tab_David-Kirshon

fix: Validate wallet and profile only in mint form
  • Loading branch information
dmkirshon authored Jan 24, 2024
2 parents cdffdaa + 2b7c4ec commit e8b7961
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/studio/src/pages/home/library/MintSong.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ const MintSong = () => {
? dirty
: values.isMinting;

// if minting has been toggled but mint hasn't been initiated
const isMintingFormVisible = !isMintingInitiated && values.isMinting;

const isStepOneButtonDisabled =
isMintingFormVisible && (!isVerified || !wallet);

const handleChangeOwners = (values: ReadonlyArray<Owner>) => {
setFieldValue("owners", values);
};
Expand Down Expand Up @@ -347,7 +353,7 @@ const MintSong = () => {
</Box>
) }

{ values.isMinting && !isVerified && (
{ isMintingFormVisible && !isVerified && (
<Alert
action={
<Button
Expand Down Expand Up @@ -376,7 +382,7 @@ const MintSong = () => {
</Alert>
) }

{ values.isMinting && !wallet && (
{ isMintingFormVisible && !wallet && (
<Alert
action={
<Button
Expand Down Expand Up @@ -424,7 +430,7 @@ const MintSong = () => {

{ isStepOneButtonVisible && (
<Button
disabled={ !isVerified || !wallet }
disabled={ isStepOneButtonDisabled }
isLoading={ isLoading }
width={
windowWidth &&
Expand Down

0 comments on commit e8b7961

Please sign in to comment.