-
Notifications
You must be signed in to change notification settings - Fork 925
Encode to ReadonlyUint8Array in codecs #2392
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @mcintyre94 and the rest of your teammates on Graphite |
615f470
to
28fe2a7
Compare
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.
Love it!
Promise.all([getAddressFromPublicKey(keyPair.publicKey), signBytes(keyPair.privateKey, wireMessageBytes)]), | ||
Promise.all([ | ||
getAddressFromPublicKey(keyPair.publicKey), | ||
signBytes(keyPair.privateKey, wireMessageBytes as Uint8Array), |
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.
You should be able to remove that cast on the next PR.
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.
And also kill this entire file 1,000,000 PRs into the future :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.
@@ -55,7 +55,7 @@ export class Transaction { | |||
'us know: https://github.com/solana-labs/solana-web3.js/issues/new/choose', | |||
); | |||
} | |||
const byteArray = getTransactionEncoder().encode(this.#tx as CompilableTransaction); | |||
const byteArray = getTransactionEncoder().encode(this.#tx as CompilableTransaction) as Uint8Array; |
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.
LOL.
Also, I should really delete this after you land this so that you never have to spend time on it again.
f6d9e8e
to
6d5b8ef
Compare
28fe2a7
to
1fcd4a9
Compare
🎉 This PR is included in version 1.91.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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. |
This PR refactors codecs to always return
ReadonlyUint8Array
instead ofUint8Array
I'm suspicious how straightforward this one was!
Addresses #2362.