Update web3 to 0.39.1

This commit is contained in:
Justin Starry 2020-03-31 13:47:43 +08:00 committed by Michael Vines
parent 2e20b9f43e
commit f55c53e5ca
4 changed files with 15 additions and 15 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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";

View File

@ -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;