From c502fc72f6743e0fe8ab7c882d94f58a26527fe4 Mon Sep 17 00:00:00 2001 From: steveluscher Date: Fri, 22 Jul 2022 00:59:32 -0700 Subject: [PATCH] fix: use `maxSupportedTransactionVersion` param when getting raw transactions in Explorer --- explorer/package-lock.json | 14 +++++++------- explorer/package.json | 2 +- explorer/src/providers/transactions/raw.tsx | 7 ++++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/explorer/package-lock.json b/explorer/package-lock.json index dd9122358a..16a2992a5d 100644 --- a/explorer/package-lock.json +++ b/explorer/package-lock.json @@ -21,7 +21,7 @@ "@sentry/react": "^7.6.0", "@solana/buffer-layout": "^3.0.0", "@solana/spl-token-registry": "^0.2.3736", - "@solana/web3.js": "^1.49.0", + "@solana/web3.js": "^1.50.0", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.3", @@ -5171,9 +5171,9 @@ } }, "node_modules/@solana/web3.js": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.49.0.tgz", - "integrity": "sha512-u+M5Nf1arU1cam+Oot2fZyOcuITSbSWBLVfpoLiKPG48JWsqf59oTdl+q9Q/jZTn/eaxeSvA9LZVKGkvAxZjHA==", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.50.0.tgz", + "integrity": "sha512-9KCuF3QLHd/dkYlffYPSHPbPFaBKqiwwDqWR+C/z1CZZbQybu+NCydWvwHHqrrlG50wn15L/6zYLb5Tjr6tOkA==", "dependencies": { "@babel/runtime": "^7.12.5", "@ethersproject/sha2": "^5.5.0", @@ -31133,9 +31133,9 @@ } }, "@solana/web3.js": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.49.0.tgz", - "integrity": "sha512-u+M5Nf1arU1cam+Oot2fZyOcuITSbSWBLVfpoLiKPG48JWsqf59oTdl+q9Q/jZTn/eaxeSvA9LZVKGkvAxZjHA==", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.50.0.tgz", + "integrity": "sha512-9KCuF3QLHd/dkYlffYPSHPbPFaBKqiwwDqWR+C/z1CZZbQybu+NCydWvwHHqrrlG50wn15L/6zYLb5Tjr6tOkA==", "requires": { "@babel/runtime": "^7.12.5", "@ethersproject/sha2": "^5.5.0", diff --git a/explorer/package.json b/explorer/package.json index b9e52b3f1d..eae3497de9 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -15,7 +15,7 @@ "@sentry/react": "^7.6.0", "@solana/buffer-layout": "^3.0.0", "@solana/spl-token-registry": "^0.2.3736", - "@solana/web3.js": "^1.49.0", + "@solana/web3.js": "^1.50.0", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.3", diff --git a/explorer/src/providers/transactions/raw.tsx b/explorer/src/providers/transactions/raw.tsx index 3e928b20e5..c04903eb2b 100644 --- a/explorer/src/providers/transactions/raw.tsx +++ b/explorer/src/providers/transactions/raw.tsx @@ -66,7 +66,12 @@ async function fetchRawTransaction( ) { let fetchStatus; try { - const response = await new Connection(url).getTransaction(signature); + const response = await new Connection(url).getTransaction(signature, { + maxSupportedTransactionVersion: process.env + .REACT_APP_MAX_SUPPORTED_TRANSACTION_VERSION + ? parseInt(process.env.REACT_APP_MAX_SUPPORTED_TRANSACTION_VERSION, 10) + : 0, + }); fetchStatus = FetchStatus.Fetched; let data: Details = { raw: null };