feat: use specialized explorer endpoints (#17516)

This commit is contained in:
Josh 2021-05-26 07:09:35 -07:00 committed by GitHub
parent 302b83a198
commit 752cd7d15e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 24450 deletions

24465
explorer/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -198,7 +198,7 @@ function ClusterToggle() {
>
{`${clusterName(net)}: `}
<span className="text-muted d-inline-block">
{clusterUrl(net, customUrl)}
{clusterUrl(net, customUrl).replace("explorer-", "")}
</span>
</Link>
);

View File

@ -58,11 +58,11 @@ export const DEVNET_URL = clusterApiUrl("devnet");
export function clusterUrl(cluster: Cluster, customUrl: string): string {
switch (cluster) {
case Cluster.Devnet:
return DEVNET_URL;
return DEVNET_URL.replace("api", "explorer-api");
case Cluster.MainnetBeta:
return MAINNET_BETA_URL;
return MAINNET_BETA_URL.replace("api", "explorer-api");
case Cluster.Testnet:
return TESTNET_URL;
return TESTNET_URL.replace("api", "explorer-api");
case Cluster.Custom:
return customUrl;
}