chore:(deps): bump prettier from 2.2.1 to 2.3.0 in /explorer (#17454)

* chore:(deps): bump prettier from 2.2.1 to 2.3.0 in /explorer

Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

* format

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
dependabot[bot] 2021-05-24 21:24:11 -07:00 committed by GitHub
parent dbd7be5ff1
commit 744f4dd834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 47 additions and 59 deletions

View File

@ -15465,9 +15465,9 @@
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
},
"prettier": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q=="
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz",
"integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w=="
},
"pretty-bytes": {
"version": "5.6.0",

View File

@ -36,7 +36,7 @@
"cross-fetch": "^3.1.4",
"humanize-duration-ts": "^2.1.1",
"node-sass": "^5.0.0",
"prettier": "^2.2.1",
"prettier": "^2.3.0",
"react": "^17.0.2",
"react-chartjs-2": "^2.11.2",
"react-countup": "^4.3.3",

View File

@ -147,9 +147,10 @@ function TpsBarChart({ performanceInfo }: TpsBarChartProps) {
const averageTps = Math.round(avgTps).toLocaleString("en-US");
const transactionCount = <AnimatedTransactionCount info={performanceInfo} />;
const seriesData = perfHistory[series];
const chartOptions = React.useMemo(() => CHART_OPTIONS(historyMaxTps), [
historyMaxTps,
]);
const chartOptions = React.useMemo(
() => CHART_OPTIONS(historyMaxTps),
[historyMaxTps]
);
const seriesLength = seriesData.length;
const chartData: Chart.ChartData = {

View File

@ -19,10 +19,10 @@ export function TokenLargestAccountsCard({ pubkey }: { pubkey: PublicKey }) {
const mintInfo = useMintAccountInfo(mintAddress);
const largestAccounts = useTokenLargestTokens(mintAddress);
const fetchLargestAccounts = useFetchTokenLargestAccounts();
const refreshLargest = React.useCallback(() => fetchLargestAccounts(pubkey), [
pubkey,
fetchLargestAccounts,
]);
const refreshLargest = React.useCallback(
() => fetchLargestAccounts(pubkey),
[pubkey, fetchLargestAccounts]
);
const { tokenRegistry } = useTokenRegistry();
const unit = tokenRegistry.get(mintAddress)?.symbol;
const unitLabel = unit ? `(${unit})` : "";

View File

@ -59,10 +59,8 @@ export function TokenInstructionsCard({ pubkey }: { pubkey: PublicKey }) {
extractMintDetails(parsed, mintMap);
let instructions: (
| ParsedInstruction
| PartiallyDecodedInstruction
)[] = [];
let instructions: (ParsedInstruction | PartiallyDecodedInstruction)[] =
[];
InstructionContainer.create(parsed).instructions.forEach(
({ instruction, inner }, index) => {

View File

@ -47,10 +47,10 @@ export function TokenTransfersCard({ pubkey }: { pubkey: PublicKey }) {
const { tokenRegistry } = useTokenRegistry();
const mintDetails = React.useMemo(() => tokenRegistry.get(address), [
address,
tokenRegistry,
]);
const mintDetails = React.useMemo(
() => tokenRegistry.get(address),
[address, tokenRegistry]
);
const transactionRows = React.useMemo(() => {
if (history?.data?.fetched) {

View File

@ -15,8 +15,7 @@ import { MintsProvider } from "providers/mints";
if (process.env.NODE_ENV === "production") {
Sentry.init({
dsn:
"https://5efdc15b4828434fbe949b5daed472be@o434108.ingest.sentry.io/5390542",
dsn: "https://5efdc15b4828434fbe949b5daed472be@o434108.ingest.sentry.io/5390542",
});
}

View File

@ -218,12 +218,8 @@ function StatsCardBody() {
return <StatsNotReady error={error} />;
}
const {
avgSlotTime_1h,
avgSlotTime_1min,
epochInfo,
blockTime,
} = dashboardInfo;
const { avgSlotTime_1h, avgSlotTime_1min, epochInfo, blockTime } =
dashboardInfo;
const hourlySlotTime = Math.round(1000 * avgSlotTime_1h);
const averageSlotTime = Math.round(1000 * avgSlotTime_1min);
const { slotIndex, slotsInEpoch } = epochInfo;

View File

@ -60,9 +60,8 @@ export function TransactionDetailsPage({ signature: raw }: SignatureProps) {
} catch (err) {}
const status = useTransactionStatus(signature);
const [zeroConfirmationRetries, setZeroConfirmationRetries] = React.useState(
0
);
const [zeroConfirmationRetries, setZeroConfirmationRetries] =
React.useState(0);
let autoRefresh = AutoRefresh.Inactive;

View File

@ -46,9 +46,8 @@ function reconcile(
}
export const StateContext = React.createContext<State | undefined>(undefined);
export const DispatchContext = React.createContext<Dispatch | undefined>(
undefined
);
export const DispatchContext =
React.createContext<Dispatch | undefined>(undefined);
type RewardsProviderProps = { children: React.ReactNode };

View File

@ -119,9 +119,8 @@ function parseQuery(query: URLSearchParams): Cluster {
}
type SetShowModal = React.Dispatch<React.SetStateAction<boolean>>;
const ModalContext = React.createContext<[boolean, SetShowModal] | undefined>(
undefined
);
const ModalContext =
React.createContext<[boolean, SetShowModal] | undefined>(undefined);
const StateContext = React.createContext<State | undefined>(undefined);
const DispatchContext = React.createContext<Dispatch | undefined>(undefined);

View File

@ -53,25 +53,24 @@ const initialDashboardInfo: DashboardInfo = {
};
type SetActive = React.Dispatch<React.SetStateAction<boolean>>;
const StatsProviderContext = React.createContext<
| {
setActive: SetActive;
setTimedOut: Function;
retry: Function;
active: boolean;
}
| undefined
>(undefined);
const StatsProviderContext =
React.createContext<
| {
setActive: SetActive;
setTimedOut: Function;
retry: Function;
active: boolean;
}
| undefined
>(undefined);
type DashboardState = { info: DashboardInfo };
const DashboardContext = React.createContext<DashboardState | undefined>(
undefined
);
const DashboardContext =
React.createContext<DashboardState | undefined>(undefined);
type PerformanceState = { info: PerformanceInfo };
const PerformanceContext = React.createContext<PerformanceState | undefined>(
undefined
);
const PerformanceContext =
React.createContext<PerformanceState | undefined>(undefined);
type Props = { children: React.ReactNode };
export function SolanaClusterStatsProvider({ children }: Props) {

View File

@ -19,9 +19,8 @@ type State = Cache.State<Details>;
type Dispatch = Cache.Dispatch<Details>;
export const StateContext = React.createContext<State | undefined>(undefined);
export const DispatchContext = React.createContext<Dispatch | undefined>(
undefined
);
export const DispatchContext =
React.createContext<Dispatch | undefined>(undefined);
type DetailsProviderProps = { children: React.ReactNode };
export function DetailsProvider({ children }: DetailsProviderProps) {

View File

@ -168,10 +168,8 @@ export function getTokenInstructionType(
signatureInfo: ConfirmedSignatureInfo,
index: number
): InstructionType | undefined {
const innerInstructions: (
| ParsedInstruction
| PartiallyDecodedInstruction
)[] = [];
const innerInstructions: (ParsedInstruction | PartiallyDecodedInstruction)[] =
[];
if (transaction.meta?.innerInstructions) {
transaction.meta.innerInstructions.forEach((ix) => {

View File

@ -20,7 +20,8 @@ import { Cluster } from "providers/cluster";
import { SerumMarketRegistry } from "serumMarketRegistry";
import { TokenInfoMap } from "@solana/spl-token-registry";
export type ProgramName = typeof PROGRAM_NAME_BY_ID[keyof typeof PROGRAM_NAME_BY_ID];
export type ProgramName =
typeof PROGRAM_NAME_BY_ID[keyof typeof PROGRAM_NAME_BY_ID];
export enum PROGRAM_NAMES {
// native built-ins