Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-5594 fix(launchpad): fix validation errors in create step #1066

Conversation

Vitalsine85
Copy link
Member

Affected Packages

Apps

  • data populator
  • portal
  • template
  • launchpad

Packages

  • 1ui
  • api
  • graphql
  • protocol
  • sdk

Tools

  • tools

Overview

Validation errors weren't rendering on the create step, specifically if a user had insufficient funds. Moved the check outside of the zod schema. Should revisit to figure out ideal pattern, just wanted to get this in to move QA forward.

Screen Captures

If applicable, add screenshots or screen captures of your changes.

Declaration

  • I hereby declare that I have abided by the rules and regulations as outlined in the CONTRIBUTING.md

@github-actions github-actions bot added the fix Fix label Jan 24, 2025
Copy link
Member

@jonathanprozzi jonathanprozzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Remove the console logs and then we're good!

})
return false
}
// TODO: Figure out why validation isn't working in this block
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for comment! We can think through it more

@@ -152,7 +161,31 @@ export function CreateStep({ onCreationSuccess }: CreateStepProps) {
}

const handleDepositSubmit = async (data: DepositFormData) => {
console.log('handleDepositSubmit called with data:', data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove or use logger

+formatUnits(BigInt(atomCost ?? '0'), 18) + +data.amount
).toString()

console.log('Debug validation:', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@Vitalsine85 Vitalsine85 merged commit 2b406f3 into feature/launchpad Jan 24, 2025
2 checks passed
@Vitalsine85 Vitalsine85 deleted the vital/eng-5594-didnt-have-enough-testnet-eth-for-the-atom-creation-but-had branch January 24, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants