From 925f22003209944f2069ad43e1f0d83d6d9c68a9 Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 7 Aug 2024 11:42:28 -0700 Subject: [PATCH] chore: release (#1001) --- .changeset/honest-lies-walk.md | 7 ++-- .changeset/pretty-fireants-deliver.md | 5 --- CHANGELOG.md | 2 +- site/docs/pages/identity/types.mdx | 55 +++++++++++++++++++++++++++ src/identity/index.ts | 7 ++++ src/identity/types.ts | 6 --- src/version.ts | 2 +- vitest.config.ts | 6 +-- 8 files changed, 71 insertions(+), 19 deletions(-) delete mode 100644 .changeset/pretty-fireants-deliver.md diff --git a/.changeset/honest-lies-walk.md b/.changeset/honest-lies-walk.md index d8a97f6375..f23ecba444 100644 --- a/.changeset/honest-lies-walk.md +++ b/.changeset/honest-lies-walk.md @@ -1,6 +1,7 @@ --- -"@coinbase/onchainkit": minor +"@coinbase/onchainkit": patch --- -**feat**: Add chain props to `useAvatar` and `getAvatar` to resolve Base avatar. By @kirkas #986 -**feat**: Modify `getAvatar` to resolve Base avatar, and fallback to mainnet if none is found. By @kirkas #986 \ No newline at end of file +- **chore**: updated all Wallet dropdown SVGs to render 16x16. Update text to Claim Basename (if no Basename), otherwise "Profile". By @cpcramer #990 +- **feat**: added chain props to `useAvatar` and `getAvatar` to resolve Base avatar. By @kirkas #986 +- **feat**: modified `getAvatar` to resolve Base avatar, and fallback to mainnet if none is found. By @kirkas #986 diff --git a/.changeset/pretty-fireants-deliver.md b/.changeset/pretty-fireants-deliver.md deleted file mode 100644 index 1001d0fd41..0000000000 --- a/.changeset/pretty-fireants-deliver.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@coinbase/onchainkit": patch ---- - --**chore**: Update all Wallet dropdown SVGs to render 16x16. Update text to Claim Basename (if no Basename), otherwise "Profile". By @cpcramer #990 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b98897c91..ed9636fcff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- 031251d: - **fix**: wallet dark mode. By @kyhyco #995 +- **fix**: wallet dark mode. By @kyhyco #995 031251d ## 0.28.2 diff --git a/site/docs/pages/identity/types.mdx b/site/docs/pages/identity/types.mdx index 992b439f33..b2f200f580 100644 --- a/site/docs/pages/identity/types.mdx +++ b/site/docs/pages/identity/types.mdx @@ -75,6 +75,25 @@ type BaseSepoliaName = `${string}.basetest.eth`; type EASSchemaUid = `0x${string}`; ``` +## `EASChainDefinition` + +```ts +type EASChainDefinition = { + easGraphqlAPI: string; // EAS GraphQL API endpoint + id: number; // blockchain source id + schemaUids: EASSchemaUid[]; // Array of EAS Schema UIDs +}; +``` + +## `EthBalanceReact` + +```ts +type EthBalanceReact = { + address?: Address; + className?: string; +}; +``` + ## `GetAttestationsOptions` ```ts @@ -148,3 +167,39 @@ type NameReact = { className?: string; // Optional className override for top span element. } & HTMLAttributes; // Optional additional span attributes to apply to the name. ``` + +## `UseAvatarOptions` + +```ts +type UseAvatarOptions = { + ensName: string; + chain?: Chain; // Optional chain for domain resolution +}; +``` + +## `UseAvatarQueryOptions` + +```ts +type UseAvatarQueryOptions = { + enabled?: boolean; + cacheTime?: number; +}; +``` + +## `UseNameOptions` + +```ts +type UseNameOptions = { + address: Address; // The Ethereum address for which the ENS name is to be fetched. + chain?: Chain; // Optional chain for domain resolution +}; +``` + +## `UseNameQueryOptions` + +```ts +type UseNameQueryOptions = { + enabled?: boolean; // Whether the query should be enabled. Defaults to true. + cacheTime?: number; // Cache time in milliseconds. +}; +``` diff --git a/src/identity/index.ts b/src/identity/index.ts index 1f5fc8cf08..af8e7b68f3 100644 --- a/src/identity/index.ts +++ b/src/identity/index.ts @@ -12,6 +12,7 @@ export { useAttestations } from './hooks/useAttestations'; export { useAvatar } from './hooks/useAvatar'; export { useName } from './hooks/useName'; export type { + AddressReact, Attestation, AvatarReact, BadgeReact, @@ -20,11 +21,17 @@ export type { BaseSepoliaName, EASChainDefinition, EASSchemaUid, + EthBalanceReact, GetAttestationsOptions, GetAvatar, GetAvatarReturnType, + GetName, GetNameReturnType, IdentityContextType, IdentityReact, + NameReact, UseAvatarOptions, + UseAvatarQueryOptions, + UseNameOptions, + UseNameQueryOptions, } from './types'; diff --git a/src/identity/types.ts b/src/identity/types.ts index cedf293173..a5fb2bf4b2 100644 --- a/src/identity/types.ts +++ b/src/identity/types.ts @@ -137,9 +137,6 @@ export type IdentityContextType = { schemaId?: Address | null; // The Ethereum address of the schema to use for EAS attestation. }; -/** - * Note: exported as public Type - */ export type IdentityProviderReact = { address?: Address; children: ReactNode; @@ -169,9 +166,6 @@ export type NameReact = { className?: string; // Optional className override for top span element. } & HTMLAttributes; // Optional additional span attributes to apply to the name. -/** - * Note: exported as public Type - */ export type ResolverAddressesByChainIdMap = Record; export type UseAttestations = { diff --git a/src/version.ts b/src/version.ts index edeeaa16c3..1bf1377fba 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '0.28.3'; +export const version = '0.28.4'; diff --git a/vitest.config.ts b/vitest.config.ts index 4173c24665..3e000c09a5 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -22,10 +22,10 @@ export default defineConfig({ ], reportOnFailure: true, thresholds: { - statements: 99.1, - branches: 97.6, + statements: 99.13, + branches: 97.68, functions: 93.33, - lines: 99.1, + lines: 99.13, }, }, environment: 'jsdom',