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

Import Airdrop recipients via DnD or copy-paste #2705

Merged
merged 7 commits into from
Feb 5, 2025

Conversation

mudrila
Copy link
Contributor

@mudrila mudrila commented Feb 1, 2025

Changes

  • Fix crash when trying to open Airdrop template or Send Assets template on the DAO that doesn't have any ERC-20 in it's treasury
  • Add DnD input field for importing recipients from CSV
  • Add functionality to handle copy-pasting recipients into address field

Testing

Safe has no any ERC-20 tokens

  1. Open Safe's Proposal Templates page
  2. Try clicking Airdrop template -> make sure error text is present, saying that there're no assets
  3. Try clicking Send Assets template -> make sure error text is present, saying that there're no assets

Safe has ERC-20 tokens

  1. Open Safe's Proposal Templates page
  2. Try importing recipients from correctly formatted CSV file -> make sure it added proper recipients with corresponding addresses and amounts
  3. Try copy-pasting CSV content into address input -> make sure it properly adjusted recipients
  4. Try importing / copy-pasting badly formatted CSV file -> make sure it doesn't change recipients and error toast shows up
  5. Try creating proposal for the airdrop after importing recipients from properly formatted CSV -> make sure during proposal creation it displays proper "Airdrop action" and executing proposal disperses right amount of tokens to the proper recipients addresses

Screenshots

Screenshot 2025-02-01 at 02 40 11 Screenshot 2025-02-01 at 02 50 44

@nicolaus-sherrill @parkermccurley Given there's no rush - would be nice to get some UI / UX / Copy comments to polish this thing

…s when DAO doesn't have any fungible assets. Implement DnD file import for importing recipients for airdrop from CSV
@mudrila mudrila added the bug Something isn't working label Feb 1, 2025
@mudrila mudrila self-assigned this Feb 1, 2025
Copy link

@parkermccurley parkermccurley left a comment

Choose a reason for hiding this comment

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

Hey @mudrila this looks great.

Add a ":" after "Available Balance" so it is "Available Balance:"
"Drag & drop a .csv file here, or click to select one"
"address,amount one entry per row"
When the number of recipients is 1, it should say "recipient" not "recipients"

Please factor these items in before merging. Feel free to ping me on Slack if you need anything so I can respond quickly.

Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2025

Deploying decent-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: f90a095
Status: ✅  Deploy successful!
Preview URL: https://435de895.decent-interface.pages.dev
Branch Preview URL: https://feature-airdrop-import-recip.decent-interface.pages.dev

View logs

@mudrila mudrila requested a review from adamgall February 4, 2025 20:39
Copy link

@parkermccurley parkermccurley left a comment

Choose a reason for hiding this comment

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

Thanks @mudrila lfg

@mudrila mudrila merged commit a4c1c6b into develop Feb 5, 2025
4 checks passed
@mudrila mudrila deleted the feature/airdrop-import-recipients-from-csv branch February 5, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants