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

allow custom metadata pubkey on solana #112

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

Yolley
Copy link
Collaborator

@Yolley Yolley commented Dec 7, 2023

No description provided.

@Yolley Yolley merged commit 71ae905 into master Dec 7, 2023
1 check passed
@Yolley Yolley deleted the oleg/feature/STREAM-1013_support_custom_metadata branch December 7, 2023 03:39
Copy link

github-actions bot commented Dec 7, 2023

@@ -263,19 +272,26 @@ export default class SolanaStreamClient extends BaseStreamClient {
const mintPublicKey = new PublicKey(mint);
const recipientPublicKey = new PublicKey(recipient);

const metadata = Keypair.generate();
let metadata: Keypair | null = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is literally copy-pasta from above.
Let's not do that @Yolley :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was going with a quick solution, Solana is the oldest sdk client, it has some duplications.

sender,
metadataPubKeys: metadataPubKeys[i] ? [metadataPubKeys[i]] : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

So we have 2 arrays: metadataPubKeys and recipients that have the same length.
Can we just assign both props in the single array?
Easier to itterate

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please provide an example implementation, this is a Solana extension, it is not supported by other chains, so it can't be part of common interfaces.

@@ -824,9 +842,16 @@ export default class SolanaStreamClient extends BaseStreamClient {
typeof this.commitment == "string" ? this.commitment : this.commitment.commitment;
const recipientPublicKey = new PublicKey(recipient.recipient);
const mintPublicKey = new PublicKey(mint);
const metadata = Keypair.generate();
let metadata: Keypair | null = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Woah, third place

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.

2 participants