Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Update deprecated commitments (#16794)
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots authored Apr 24, 2021
1 parent d9dcd28 commit 2420b28
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion explorer/src/providers/accounts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async function fetchAccountInfo(
let data;
let fetchStatus;
try {
const connection = new Connection(url, "single");
const connection = new Connection(url, "confirmed");
const result = (await connection.getParsedAccountInfo(pubkey)).value;

let lamports, details;
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/providers/accounts/tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function fetchAccountTokens(
try {
const { value } = await new Connection(
url,
"recent"
"processed"
).getParsedTokenAccountsByOwner(pubkey, { programId: TOKEN_PROGRAM_ID });
data = {
tokens: value.map((accountInfo) => {
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/providers/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export async function fetchBlock(
let data: Block | undefined = undefined;

try {
const connection = new Connection(url, "max");
const connection = new Connection(url, "finalized");
data = { block: await connection.getConfirmedBlock(Number(key)) };
status = FetchStatus.Fetched;
} catch (err) {
Expand Down
4 changes: 2 additions & 2 deletions explorer/src/providers/mints/largest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function fetchLargestAccounts(
try {
data = {
largest: (
await new Connection(url, "single").getTokenLargestAccounts(pubkey)
await new Connection(url, "confirmed").getTokenLargestAccounts(pubkey)
).value,
};

Expand All @@ -76,7 +76,7 @@ async function fetchLargestAccounts(
async (account): Promise<TokenAccountBalancePairWithOwner> => {
try {
const accountInfo = (
await new Connection(url, "single").getParsedAccountInfo(
await new Connection(url, "confirmed").getParsedAccountInfo(
account.address
)
).value;
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/providers/richList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function fetch(dispatch: Dispatch, cluster: Cluster, url: string) {
dispatch(Status.Connecting);

try {
const connection = new Connection(url, "max");
const connection = new Connection(url, "finalized");

const [total, circulating, nonCirculating] = (
await Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/providers/supply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function fetch(dispatch: Dispatch, cluster: Cluster, url: string) {
dispatch(Status.Connecting);

try {
const connection = new Connection(url, "max");
const connection = new Connection(url, "finalized");
const supply = (await connection.getSupply()).value;

// Update state if still connecting
Expand Down

0 comments on commit 2420b28

Please sign in to comment.