Skip to content

Conversation

@hypercerts-admin
Copy link

Automated PR from dev to main (release)

tnkshuuhei and others added 20 commits February 23, 2025 17:16
- Add a 'Delete' button for the created/uploaded allowlist
- When the allow list is provided via manual creation, disable the URL input
When an URL was input, allow for editing the allowlist in the creation modal.
onChange will handle the validation for provided link, and if validation is succeeded, call form.setValue("allowlistEntries", ...) to update allowlist data
Added a new function to fetch and parse allowlist data from a provided URL. The function validates the URL, checks the content type, and processes CSV or plain text files. If the data is valid, it updates the form with the allowlist entries. Enhanced the UI with a 'Fetch URL' button to trigger this functionality.
Improved the allowlist entry validation and scaling logic by calculating total units and proportionally scaling each entry's units based on the total.
change intended to allow user to edit allowlist on dialog if user uploaded via url. if user updated allowlist, then delete original url to avoid confliction in a minting process
Updated the allowlist entry calculations to explicitly convert units to BigInt before processing. This change improves the accuracy of percentage calculations displayed in the minting form.
- put all buttons below the URL
- rename: Reset -> Delete
- rename: Fetch URL -> Import from URL
Extracted the allowlist fetching and parsing logic into a separate function
changes:
- split parseAllowList and forocused it to parse only.
- Add to throw errors.
- Implemented tests to validate the parsing of allowlist CSV files with various delimiters (comma, semicolon).
- Added checks for correct handling of rounding errors and invalid Ethereum addresses.
- Ensured that empty lines in the CSV are ignored and that the total units match the expected DEFAULT_NUM_UNITS.
The TODOs were actually part of a WIP commit, but were not thrown out as
intended after finishing the implementation.
Since it's already available in the scope, why not use it?
This feels like a reusable component but it's not. Let's improve it!
When viewing the profile of a smart contract address, there is a
non-zero chance that the ownership across different networks varies.
This could be exploitet, so it's best to prompt the users to do their
own research.
…mprovements

feat: allowlist creation improvements
@hypercerts-admin hypercerts-admin added the automated pr PR created via GitHub action label Mar 25, 2025
@vercel
Copy link

vercel bot commented Mar 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hypercerts-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 3:50pm

Without this patch the user can only mint a Hypercert with their
connected browser wallet.

By passing the Safe address into the SDK function the Safe flow is
invoked. The minting dialog now shows fewer steps and proposes a Safe
transaction on successful signature.
It's not leading to an error, but it shouldn't be there anyway.
@pheuberger
Copy link
Member

@Jipperism There's an error only from the Release automation action, which complains about the PR already being open. This isn't a problem as my changes are now merged into this PR, so we can release @tnkshuuhei and my changes together.

image

@pheuberger pheuberger merged commit 8983d77 into main Mar 25, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated pr PR created via GitHub action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants