File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -244,11 +244,16 @@ export async function getEns(
244
244
const resolver = await provider . getResolver ( name )
245
245
246
246
if ( resolver ) {
247
- const contentHash = await resolver . getContentHash ( )
247
+ const [ contentHash , avatar ] = await Promise . all ( [
248
+ resolver . getContentHash ( ) ,
249
+ resolver . getAvatar ( )
250
+ ] )
251
+
248
252
const getText = resolver . getText . bind ( resolver )
249
253
250
254
ens = {
251
255
name,
256
+ avatar,
252
257
contentHash,
253
258
getText
254
259
}
Original file line number Diff line number Diff line change @@ -71,10 +71,15 @@ export type Account = {
71
71
export type Balances = Record < TokenSymbol , string > | null
72
72
73
73
export interface Ens {
74
- name ?: string
75
- avatar ?: string
76
- contentHash ?: string
77
- getText ?: ( key : string ) => Promise < string | undefined >
74
+ name : string
75
+ avatar : Avatar | null
76
+ contentHash : string | null
77
+ getText : ( key : string ) => Promise < string | undefined >
78
+ }
79
+
80
+ export type Avatar = {
81
+ url : string
82
+ linkage : Array < { type : string ; content : string } >
78
83
}
79
84
80
85
export type Address = string
You can’t perform that action at this time.
0 commit comments