Skip to content

Commit

Permalink
fix verification badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra committed Nov 19, 2024
1 parent eb206db commit 6aaeffe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/components/account/VerifiedBuildCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ type TableRow = {
const ROWS: TableRow[] = [
{
display: 'Verified',
key: 'verification_status',
type: DisplayType.String,
key: 'is_verified',
type: DisplayType.Boolean,
},
{
display: 'Message',
Expand Down
19 changes: 6 additions & 13 deletions app/components/common/VerifiedProgramBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,12 @@ export function VerifiedProgramBadge({
let badgeClass = '';
let badgeText = '';

switch (registryInfo.verification_status) {
case VerificationStatus.Verified:
badgeClass = 'bg-success-soft';
badgeText = 'Program Source Verified';
break;
case VerificationStatus.PdaUploaded:
badgeClass = 'bg-warning-soft';
badgeText = 'Not verified';
break;
case VerificationStatus.NotVerified:
badgeClass = 'bg-warning-soft';
badgeText = 'Not verified';
break;
if (registryInfo.is_verified) {
badgeClass = 'bg-success-soft';
badgeText = 'Program Source Verified';
} else {
badgeClass = 'bg-warning-soft';
badgeText = 'Not verified';
}

return (
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 @@ -18,6 +18,7 @@ export enum VerificationStatus {

export type OsecRegistryInfo = {
verification_status: VerificationStatus;
is_verified: boolean;
message: string;
on_chain_hash: string;
executable_hash: string;
Expand Down

0 comments on commit 6aaeffe

Please sign in to comment.