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==" "integrity": "sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw=="
}, },
"@solana/web3.js": { "@solana/web3.js": {
"version": "0.36.0", "version": "0.39.1",
"resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-0.36.0.tgz", "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-0.39.1.tgz",
"integrity": "sha512-3kkjwxSy4c7MPDY5OhZhk/AfQdk401kEHG0ZIekzFMhR/k/N1J/HYfqt9NPs5d+SNN9zkYpu9x3JcV5cMb3jdw==", "integrity": "sha512-9Z4QGF01B5GfDpHTj8GNyw4xSX34Ay8qYYihi5UtmqbuzfoSZVhdrf0TmUbZMtJMlMneQDEr507om+4IOhlgQg==",
"requires": { "requires": {
"@babel/runtime": "^7.3.1", "@babel/runtime": "^7.3.1",
"bn.js": "^5.0.0", "bn.js": "^5.0.0",
@ -10188,9 +10188,9 @@
"integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA=="
}, },
"pidtree": { "pidtree": {
"version": "0.3.0", "version": "0.3.1",
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz", "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
"integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==" "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA=="
}, },
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",

View File

@ -3,7 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@solana/web3.js": "^0.36.0", "@solana/web3.js": "^0.39.0",
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2", "@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2", "@testing-library/user-event": "^7.1.2",

View File

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import { testnetChannelEndpoint, Connection } from "@solana/web3.js"; import { clusterApiUrl, Connection } from "@solana/web3.js";
import { findGetParameter } from "../utils"; import { findGetParameter } from "../utils";
export enum ClusterStatus { 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 MAINNET_BETA_URL = clusterApiUrl("mainnet-beta");
export const TESTNET_URL = "https://testnet.solana.com"; export const TESTNET_URL = clusterApiUrl("testnet");
export const DEVNET_URL = testnetChannelEndpoint("stable"); export const DEVNET_URL = clusterApiUrl("devnet");
export const DEFAULT_CLUSTER = Cluster.MainnetBeta; export const DEFAULT_CLUSTER = Cluster.MainnetBeta;
export const DEFAULT_CUSTOM_URL = "http://localhost:8899"; export const DEFAULT_CUSTOM_URL = "http://localhost:8899";

View File

@ -157,13 +157,13 @@ export async function checkTransactionStatus(
let status; let status;
let slot; let slot;
try { 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; status = Status.Missing;
} else { } else {
slot = result.slot; slot = value.slot;
if ("Ok" in result.status) { if ("Ok" in value.status) {
status = Status.Success; status = Status.Success;
} else { } else {
status = Status.Failure; status = Status.Failure;