-
Notifications
You must be signed in to change notification settings - Fork 925
Rewrite the legacy token tests without @solana/spl-token
#2821
Rewrite the legacy token tests without @solana/spl-token
#2821
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @steveluscher and the rest of your teammates on Graphite |
e572c09
to
341c8b8
Compare
e6282c6
to
3513521
Compare
3513521
to
9ecc35e
Compare
|
||
const accountsWithProgramFilter = ( | ||
await connection.getTokenAccountsByOwner(testOwnerKeypair.publicKey, { | ||
programId: TOKEN_PROGRAM_ID, | ||
}) | ||
).value; | ||
expect(accountsWithProgramFilter).to.have.length(3); | ||
expect(accountsWithProgramFilter).to.have.length(1); |
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 not exactly the same as the prior test, but it's close enough. We're not meant to be testing the underlying RPC here.
9ecc35e
to
4aa20b3
Compare
'@solana/[email protected]([email protected])': | ||
dependencies: | ||
'@solana/codecs': 2.0.0-preview.2([email protected]) | ||
'@solana/spl-type-length-value': 0.1.0 | ||
transitivePeerDependencies: | ||
- fastestsmallesttextencoderdecoder | ||
|
||
'@solana/[email protected]([email protected])': | ||
dependencies: | ||
'@solana/codecs': 2.0.0-preview.2([email protected]) | ||
'@solana/spl-type-length-value': 0.1.0 | ||
transitivePeerDependencies: | ||
- fastestsmallesttextencoderdecoder | ||
|
||
'@solana/[email protected]([email protected])': | ||
dependencies: | ||
'@solana/buffer-layout': 4.0.1 | ||
'@solana/buffer-layout-utils': 0.2.0 | ||
'@solana/spl-token-group': 0.0.4([email protected]) | ||
'@solana/spl-token-metadata': 0.1.4([email protected]) | ||
buffer: 6.0.3 | ||
transitivePeerDependencies: | ||
- fastestsmallesttextencoderdecoder | ||
|
||
'@solana/[email protected]': | ||
dependencies: | ||
buffer: 6.0.3 | ||
|
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.
new Uint8Array([ | ||
153, 120, 247, 45, 160, 119, 144, 219, 220, 209, 73, 91, 210, 102, 31, | ||
136, 155, 12, 68, 27, 226, 215, 61, 214, 10, 245, 247, 180, 236, 63, | ||
100, 202, 140, 247, 112, 54, 120, 32, 168, 118, 72, 115, 190, 34, 171, | ||
126, 15, 119, 252, 173, 50, 173, 8, 10, 96, 239, 21, 32, 94, 67, 37, | ||
43, 145, 249, | ||
]), |
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'm wondering if this should be a fixture somewhere, like scripts/keypairs
.
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 at least wrote a comment to note what the pubkey is and where to find the fixture.
programId: new PublicKey( | ||
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', | ||
), | ||
data: Buffer.from([3, 1, 0, 0, 0, 0, 0, 0, 0]), |
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.
Maybe just add a comment here for clarity on the bytes?
const payerPublicKey = new PublicKey( | ||
'6bffFjUMnnk3tXFJAS8pp9tz6m7oJAd27vm9rKqnLtVv', | ||
); |
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.
Is this even needed anymore? Looks like no.
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.
It's used in one dumb place and I was too lazy to see if I could replace it. Let me see.
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.
Gone!
3fef1d9
to
ea7da77
Compare
ea7da77
to
b305df6
Compare
b305df6
to
21a7add
Compare
Merge activity
|
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
No description provided.