import type { Maybe, MetadataAttributeFragment } from "@hey/indexer"; type Key = "location" | "website" | "x" | "creatorCoinAddress"; const getAccountAttribute = ( key: Key, attributes: Maybe = [] ): string => { const attribute = attributes?.find((attr) => attr.key === key); return attribute?.value || ""; }; export default getAccountAttribute;