Skip to content

Commit

Permalink
Fix dns multiple admins (#1601)
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-nayaka authored Jul 17, 2024
1 parent 0ca1300 commit d3d45a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion idea/frontend/src/features/dns/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Dns = {
id: string; // same as 'name' at contract
name: string;
address: HexString; // same as 'program_id' at contract
admin: HexString | null;
admins: HexString[];
createdBy: HexString;
createdAt: string;
updatedAt: string;
Expand Down
3 changes: 2 additions & 1 deletion idea/frontend/src/features/dns/ui/dns-card/dns-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ type Props = {
};

function DnsCard({ dns, onSuccess }: Props) {
const { name, address, updatedAt, createdAt, createdBy, admin } = dns;
const { name, address, updatedAt, createdAt, createdBy, admins } = dns;
const { account } = useAccount();
const admin = admins[0];

const isOwner = createdBy === account?.decodedAddress;
const timePrefix = updatedAt === createdAt ? 'Created at:' : 'Updated at:';
Expand Down

0 comments on commit d3d45a9

Please sign in to comment.