Skip to content

Commit

Permalink
chore: release (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Aug 7, 2024
1 parent 0351295 commit 925f220
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 19 deletions.
7 changes: 4 additions & 3 deletions .changeset/honest-lies-walk.md
Original file line number Diff line number Diff line change
@@ -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
- **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
5 changes: 0 additions & 5 deletions .changeset/pretty-fireants-deliver.md

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
55 changes: 55 additions & 0 deletions site/docs/pages/identity/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -148,3 +167,39 @@ type NameReact = {
className?: string; // Optional className override for top span element.
} & HTMLAttributes<HTMLSpanElement>; // 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.
};
```
7 changes: 7 additions & 0 deletions src/identity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -20,11 +21,17 @@ export type {
BaseSepoliaName,
EASChainDefinition,
EASSchemaUid,
EthBalanceReact,
GetAttestationsOptions,
GetAvatar,
GetAvatarReturnType,
GetName,
GetNameReturnType,
IdentityContextType,
IdentityReact,
NameReact,
UseAvatarOptions,
UseAvatarQueryOptions,
UseNameOptions,
UseNameQueryOptions,
} from './types';
6 changes: 0 additions & 6 deletions src/identity/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -169,9 +166,6 @@ export type NameReact = {
className?: string; // Optional className override for top span element.
} & HTMLAttributes<HTMLSpanElement>; // Optional additional span attributes to apply to the name.

/**
* Note: exported as public Type
*/
export type ResolverAddressesByChainIdMap = Record<number, Address>;

export type UseAttestations = {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '0.28.3';
export const version = '0.28.4';
6 changes: 3 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 925f220

Please sign in to comment.