-
Notifications
You must be signed in to change notification settings - Fork 30
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
allow custom metadata pubkey on solana #112
Conversation
@@ -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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah, third place
No description provided.