Skip to content

Commit

Permalink
tmp pull verified build info
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra committed Nov 20, 2024
1 parent 4ad54dd commit e48182b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
16 changes: 9 additions & 7 deletions app/address/[address]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ const TABS_LOOKUP: { [id: string]: Tab[] } = {
slug: 'security',
title: 'Security',
},
{
path: 'verified-build',
slug: 'verified-build',
title: 'Verified Build',
},
// {
// path: 'verified-build',
// slug: 'verified-build',
// title: 'Verified Build',
// },
],
'nftoken:collection': [
{
Expand Down Expand Up @@ -563,7 +563,7 @@ export type MoreTabs =
| 'entries'
| 'concurrent-merkle-tree'
| 'compression'
| 'verified-build'
// | 'verified-build'
| 'program-multisig';

function MoreSection({ children, tabs }: { children: React.ReactNode; tabs: (JSX.Element | null)[] }) {
Expand Down Expand Up @@ -710,7 +710,9 @@ function getCustomLinkedTabs(pubkey: PublicKey, account: Account) {
<ProgramMultisigLink
tab={programMultisigTab}
address={pubkey.toString()}
authority={(account.data.parsed as UpgradeableLoaderAccountData | undefined)?.programData?.authority}
authority={
(account.data.parsed as UpgradeableLoaderAccountData | undefined)?.programData?.authority
}
/>
</React.Suspense>
),
Expand Down
6 changes: 4 additions & 2 deletions app/address/[address]/verified-build/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import getReadableTitleFromAddress, { AddressPageMetadataProps } from '@utils/get-readable-title-from-address';
import { redirect } from 'next/navigation';
import { Metadata } from 'next/types';

import VerifiedBuildClient from './page-client';
// import VerifiedBuildClient from './page-client';

export async function generateMetadata(props: AddressPageMetadataProps): Promise<Metadata> {
return {
Expand All @@ -17,5 +18,6 @@ type Props = Readonly<{
}>;

export default function VerifiedBuildPage(props: Props) {
return <VerifiedBuildClient {...props} />;
// return <VerifiedBuildClient {...props} />;
throw redirect(`/address/${props.params.address}`);
}
7 changes: 4 additions & 3 deletions app/components/account/UpgradeableLoaderAccountSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useSquadsMultisigLookup } from '@/app/providers/squadsMultisig';
import { Cluster } from '@/app/utils/cluster';
import { useClusterPath } from '@/app/utils/url';

import { VerifiedProgramBadge } from '../common/VerifiedProgramBadge';
// import { VerifiedProgramBadge } from '../common/VerifiedProgramBadge';

export function UpgradeableLoaderAccountSection({
account,
Expand Down Expand Up @@ -119,14 +119,14 @@ export function UpgradeableProgramSection({
<td>Upgradeable</td>
<td className="text-lg-end">{programData.authority !== null ? 'Yes' : 'No'}</td>
</tr>
<tr>
{/* <tr>
<td>
<VerifiedLabel />
</td>
<td className="text-lg-end">
<VerifiedProgramBadge programData={programData} pubkey={account.pubkey} />
</td>
</tr>
</tr> */}
<tr>
<td>
<SecurityLabel />
Expand Down Expand Up @@ -183,6 +183,7 @@ function SecurityLabel() {
);
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function VerifiedLabel() {
return (
<InfoTooltip text="Verified builds allow users can ensure that the hash of the on-chain program matches the hash of the program of the given codebase (registry hosted by osec.io).">
Expand Down
1 change: 1 addition & 0 deletions app/utils/verified-builds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Cluster } from './cluster';
const OSEC_REGISTRY_URL = 'https://verify.osec.io';
const VERIFY_PROGRAM_ID = 'verifycLy8mB96wd9wqq3WDXQwM4oU6r42Th37Db9fC';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export enum VerificationStatus {
Verified = 'Verified Build',
PdaUploaded = 'Not verified Build',
Expand Down

0 comments on commit e48182b

Please sign in to comment.