ts: Fix incorrect `maxSupportedTransactionVersion` in `AnchorProvider.send*()` methods (#2922)
This commit is contained in:
parent
10c997552e
commit
c96846fce2
|
@ -17,6 +17,7 @@ The minor version will be incremented upon a breaking change and the patch versi
|
|||
### Fixes
|
||||
|
||||
- lang: Eliminate variable allocations that build up stack space for token extension code generation ([#2913](https://github.com/coral-xyz/anchor/pull/2913)).
|
||||
- ts: Fix incorrect `maxSupportedTransactionVersion` in `AnchorProvider.send*()` methods ([#2922](https://github.com/coral-xyz/anchor/pull/2922)).
|
||||
|
||||
### Breaking
|
||||
|
||||
|
|
|
@ -174,8 +174,10 @@ export class AnchorProvider implements Provider {
|
|||
? tx.signatures?.[0] || new Uint8Array()
|
||||
: tx.signature ?? new Uint8Array()
|
||||
);
|
||||
const maxVer = isVersionedTransaction(tx) ? 0 : undefined;
|
||||
const failedTx = await this.connection.getTransaction(txSig, {
|
||||
commitment: "confirmed",
|
||||
maxSupportedTransactionVersion: maxVer,
|
||||
});
|
||||
if (!failedTx) {
|
||||
throw err;
|
||||
|
@ -256,8 +258,10 @@ export class AnchorProvider implements Provider {
|
|||
? tx.signatures?.[0] || new Uint8Array()
|
||||
: tx.signature ?? new Uint8Array()
|
||||
);
|
||||
const maxVer = isVersionedTransaction(tx) ? 0 : undefined;
|
||||
const failedTx = await this.connection.getTransaction(txSig, {
|
||||
commitment: "confirmed",
|
||||
maxSupportedTransactionVersion: maxVer,
|
||||
});
|
||||
if (!failedTx) {
|
||||
throw err;
|
||||
|
|
Loading…
Reference in New Issue