Skip to content

Commit

Permalink
Remove -b flag and add link to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Woody4618 committed Oct 29, 2024
1 parent 7c6b3ec commit 9bac59b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
20 changes: 20 additions & 0 deletions app/components/account/VerifiedBuildCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ export function VerifiedBuildCard({ data, pubkey }: { data: UpgradeableLoaderAcc
<h3 className="card-header-title mb-0 d-flex align-items-center">Verified Build</h3>
<small>Information provided by osec.io</small>
</div>
<div
className="alert mt-2"
style={{
backgroundColor: '#2a3b3c',
borderRadius: '5px',
color: '#c9e2e1',
padding: '10px',
}}
>
<strong>Note:</strong> Verified builds indicate that the onchain build was built from the source code
that is publicly available, but this does not imply a security audit. For more details, refer to the{' '}
<a
href="https://solana.com/developers/guides/advanced/verified-builds"
target="_blank"
rel="noopener noreferrer"
>
Verified Builds Docs <ExternalLink className="align-text-top ms-1" size={13} />
</a>
.
</div>
<TableCardBody>
{ROWS.filter(x => x.key in registryInfo).map((x, idx) => {
return (
Expand Down
18 changes: 16 additions & 2 deletions app/utils/verified-builds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,22 @@ export function useVerifiedProgramRegistry({

// Add additional args if available, for example mount-path and --library-name
if (pdaData.args && pdaData.args.length > 0) {
const argsString = pdaData.args.join(' ');
verifiedData.verify_command += ` ${argsString}`;
const filteredArgs = [];

for (let i = 0; i < pdaData.args.length; i++) {
const arg = pdaData.args[i];

if (arg === '-b' || arg === '--base-image') {
i++; // Also skip the parameter
continue;
}
filteredArgs.push(arg);
}

if (filteredArgs.length > 0) {
const argsString = filteredArgs.join(' ');
verifiedData.verify_command += ` ${argsString}`;
}
}

return { data: verifiedData, isLoading };
Expand Down

0 comments on commit 9bac59b

Please sign in to comment.