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

Add createAta instruction if needed for transfer #266

Merged

Conversation

slimeonmyhead
Copy link
Contributor

@slimeonmyhead slimeonmyhead commented Feb 9, 2025

Pull Request Description

Handles creating the AssociatedTokenAccount for a token if the receiver doesn't have one initialized.

Test transaction

image

Changes Made

This PR adds the following changes:

  • Fixes issue when trying to send tokens to an account that has not initialized the associated token account

Implementation Details

  • Checks for the account with a try-catch block
  • Adds createAssociatedTokenAccountInstruction to the transaction if needed

Checklist

  • I have tested these changes locally
  • I have updated the documentation
  • I have added a transaction link
  • I have added the prompt used to test it

@michaelessiet
Copy link
Collaborator

Hey @slimeonmyhead , please can you share a screenshot and transaction link verifying that this PR doesn't break the existing tool and that it does what it says it does by adding an ATA creation instruction

@slimeonmyhead
Copy link
Contributor Author

@michaelessiet Updated with link

@thearyanag thearyanag merged commit e2e13fd into sendaifun:main Feb 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants