feat: add version getter to VersionedTransaction class (#27734)
This commit is contained in:
parent
079bf561b0
commit
d9b1ebece7
|
@ -4832,7 +4832,7 @@ export class Connection {
|
|||
signersOrOptions?: Array<Signer> | SendOptions,
|
||||
options?: SendOptions,
|
||||
): Promise<TransactionSignature> {
|
||||
if ('message' in transaction) {
|
||||
if ('version' in transaction) {
|
||||
if (signersOrOptions && Array.isArray(signersOrOptions)) {
|
||||
throw new Error('Invalid arguments');
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ export class VersionedTransaction {
|
|||
signatures: Array<Uint8Array>;
|
||||
message: VersionedMessage;
|
||||
|
||||
get version(): TransactionVersion {
|
||||
return this.message.version;
|
||||
}
|
||||
|
||||
constructor(message: VersionedMessage, signatures?: Array<Uint8Array>) {
|
||||
if (signatures !== undefined) {
|
||||
assert(
|
||||
|
|
Loading…
Reference in New Issue