diff --git a/explorer/package-lock.json b/explorer/package-lock.json index 57bc5291a7..1ead0fd914 100644 --- a/explorer/package-lock.json +++ b/explorer/package-lock.json @@ -1269,9 +1269,9 @@ "integrity": "sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw==" }, "@solana/web3.js": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-0.36.0.tgz", - "integrity": "sha512-3kkjwxSy4c7MPDY5OhZhk/AfQdk401kEHG0ZIekzFMhR/k/N1J/HYfqt9NPs5d+SNN9zkYpu9x3JcV5cMb3jdw==", + "version": "0.39.1", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-0.39.1.tgz", + "integrity": "sha512-9Z4QGF01B5GfDpHTj8GNyw4xSX34Ay8qYYihi5UtmqbuzfoSZVhdrf0TmUbZMtJMlMneQDEr507om+4IOhlgQg==", "requires": { "@babel/runtime": "^7.3.1", "bn.js": "^5.0.0", @@ -10188,9 +10188,9 @@ "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" }, "pidtree": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz", - "integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==" + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==" }, "pify": { "version": "2.3.0", diff --git a/explorer/package.json b/explorer/package.json index 12c924377e..6d1af9f351 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@solana/web3.js": "^0.36.0", + "@solana/web3.js": "^0.39.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", diff --git a/explorer/src/providers/cluster.tsx b/explorer/src/providers/cluster.tsx index b1052812e0..e0d98566dc 100644 --- a/explorer/src/providers/cluster.tsx +++ b/explorer/src/providers/cluster.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { testnetChannelEndpoint, Connection } from "@solana/web3.js"; +import { clusterApiUrl, Connection } from "@solana/web3.js"; import { findGetParameter } from "../utils"; export enum ClusterStatus { @@ -35,9 +35,9 @@ export function clusterName(cluster: Cluster): string { } } -export const MAINNET_BETA_URL = "https://api.mainnet-beta.solana.com"; -export const TESTNET_URL = "https://testnet.solana.com"; -export const DEVNET_URL = testnetChannelEndpoint("stable"); +export const MAINNET_BETA_URL = clusterApiUrl("mainnet-beta"); +export const TESTNET_URL = clusterApiUrl("testnet"); +export const DEVNET_URL = clusterApiUrl("devnet"); export const DEFAULT_CLUSTER = Cluster.MainnetBeta; export const DEFAULT_CUSTOM_URL = "http://localhost:8899"; diff --git a/explorer/src/providers/transactions.tsx b/explorer/src/providers/transactions.tsx index c91788d880..600431a9dd 100644 --- a/explorer/src/providers/transactions.tsx +++ b/explorer/src/providers/transactions.tsx @@ -157,13 +157,13 @@ export async function checkTransactionStatus( let status; let slot; try { - const result = await new Connection(url).getSignatureStatus(signature); + const { value } = await new Connection(url).getSignatureStatus(signature); - if (result === null) { + if (value === null) { status = Status.Missing; } else { - slot = result.slot; - if ("Ok" in result.status) { + slot = value.slot; + if ("Ok" in value.status) { status = Status.Success; } else { status = Status.Failure;