Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove identity resolver from stardust #968

Merged
merged 11 commits into from
Jan 22, 2024
7 changes: 3 additions & 4 deletions client/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const App: React.FC<RouteComponentProps<AppRouteProps>> = ({
}, [networksLoaded]);

const networkConfig = networks.find((n) => n.network === network);
const identityResolverEnabled = networkConfig?.identityResolverEnabled ?? true;
const currentNetworkName = networkConfig?.network;
const isShimmer = isShimmerUiTheme(networkConfig?.uiTheme);
const nodeService = ServiceFactory.get<NodeInfoService>("node-info");
Expand Down Expand Up @@ -87,7 +86,7 @@ const App: React.FC<RouteComponentProps<AppRouteProps>> = ({
/>
}
pages={getPages(networkConfig, networks)}
utilities={buildUtilities(network ?? "", networks, identityResolverEnabled)}
utilities={buildUtilities(network ?? "", networks)}
/>
<div className="content">
{networks.length > 0 ? (
Expand All @@ -106,9 +105,9 @@ const App: React.FC<RouteComponentProps<AppRouteProps>> = ({
)}
</div>
{isShimmer ? (
<ShimmerFooter dynamic={getFooterItems(currentNetworkName ?? "", networks, identityResolverEnabled)} />
<ShimmerFooter dynamic={getFooterItems(currentNetworkName ?? "", networks)} />
) : (
<Footer dynamic={getFooterItems(currentNetworkName ?? "", networks, identityResolverEnabled)} />
<Footer dynamic={getFooterItems(currentNetworkName ?? "", networks)} />
)}
<Disclaimer />
</div>
Expand Down
11 changes: 2 additions & 9 deletions client/src/app/AppUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ export const getPages = (currentNetwork: INetwork | undefined, networks: INetwor
return pages;
};

export const buildUtilities = (currentNetwork: string, networks: INetwork[], identityResolverEnabled: boolean) => {
export const buildUtilities = (currentNetwork: string, networks: INetwork[]) => {
const utilities = [];
if (networks.length > 0 && currentNetwork !== CHRYSALIS_MAINNET) {
utilities.push({ label: "Streams v0", url: `/${currentNetwork}/streams/0/` });
if (identityResolverEnabled) {
utilities.push({ label: "Decentralized Identifier", url: `/${currentNetwork}/identity-resolver/` });
}
}

return utilities;
Expand All @@ -59,7 +56,7 @@ export const buildUtilities = (currentNetwork: string, networks: INetwork[], ide
* @param identityResolverEnabled Is identity resolver enabled for current network.
* @returns Array of footer items
*/
export const getFooterItems = (currentNetwork: string, networks: INetwork[], identityResolverEnabled: boolean) => {
export const getFooterItems = (currentNetwork: string, networks: INetwork[]) => {
if (networks.length > 0) {
let footerArray = networks.filter((network) => network.isEnabled).map((n) => ({ label: n.label, url: n.network.toString() }));

Expand All @@ -69,10 +66,6 @@ export const getFooterItems = (currentNetwork: string, networks: INetwork[], ide
.concat({ label: "Visualizer", url: `${currentNetwork}/visualizer/` });
}

if (identityResolverEnabled && currentNetwork !== CHRYSALIS_MAINNET) {
footerArray.push({ label: "Identity Resolver", url: `${currentNetwork}/identity-resolver/` });
}

return footerArray;
}

Expand Down
7 changes: 7 additions & 0 deletions client/src/app/components/JsonViewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
font-family: "Courier New", Courier, monospace;
white-space: pre-wrap;

@include font-size(12px, 20px);

color: var(--did-color);
font-family: $ibm-plex-mono;
letter-spacing: 0.02em;
white-space: pre-wrap;

.string {
color: green;
}
Expand Down
125 changes: 0 additions & 125 deletions client/src/app/components/identity/IdentityChrysalisResolver.scss

This file was deleted.

Loading
Loading