Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
8dddaedd
Commit
8dddaedd
authored
Dec 28, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrapped owner
parent
e4b0e47b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
domain.ts
mocks/ens/domain.ts
+4
-0
ENS.ts
stubs/ENS.ts
+1
-0
ens.ts
types/api/ens.ts
+3
-0
AddressEnsDomains.tsx
ui/address/ensDomains/AddressEnsDomains.tsx
+16
-5
No files found.
mocks/ens/domain.ts
View file @
8dddaedd
...
@@ -13,6 +13,7 @@ export const ensDomainA: EnsDomainDetailed = {
...
@@ -13,6 +13,7 @@ export const ensDomainA: EnsDomainDetailed = {
owner
:
{
owner
:
{
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
},
},
wrapped_owner
:
null
,
registration_date
:
'
2021-06-27T13:34:44.000Z
'
,
registration_date
:
'
2021-06-27T13:34:44.000Z
'
,
expiry_date
:
'
2025-03-01T14:20:24.000Z
'
,
expiry_date
:
'
2025-03-01T14:20:24.000Z
'
,
other_addresses
:
{
other_addresses
:
{
...
@@ -33,6 +34,7 @@ export const ensDomainB: EnsDomainDetailed = {
...
@@ -33,6 +34,7 @@ export const ensDomainB: EnsDomainDetailed = {
owner
:
{
owner
:
{
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
},
},
wrapped_owner
:
null
,
registration_date
:
'
2023-08-13T13:01:12.000Z
'
,
registration_date
:
'
2023-08-13T13:01:12.000Z
'
,
expiry_date
:
null
,
expiry_date
:
null
,
other_addresses
:
{},
other_addresses
:
{},
...
@@ -51,6 +53,7 @@ export const ensDomainC: EnsDomainDetailed = {
...
@@ -51,6 +53,7 @@ export const ensDomainC: EnsDomainDetailed = {
owner
:
{
owner
:
{
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
},
},
wrapped_owner
:
null
,
registration_date
:
'
2022-04-24T07:34:44.000Z
'
,
registration_date
:
'
2022-04-24T07:34:44.000Z
'
,
expiry_date
:
'
2022-11-01T13:10:36.000Z
'
,
expiry_date
:
'
2022-11-01T13:10:36.000Z
'
,
other_addresses
:
{},
other_addresses
:
{},
...
@@ -67,6 +70,7 @@ export const ensDomainD: EnsDomainDetailed = {
...
@@ -67,6 +70,7 @@ export const ensDomainD: EnsDomainDetailed = {
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
hash
:
'
0x114d4603199df73e7d157787f8778e21fcd13066
'
,
},
},
owner
:
null
,
owner
:
null
,
wrapped_owner
:
null
,
registration_date
:
'
2022-04-24T07:34:44.000Z
'
,
registration_date
:
'
2022-04-24T07:34:44.000Z
'
,
expiry_date
:
'
2027-09-23T13:10:36.000Z
'
,
expiry_date
:
'
2027-09-23T13:10:36.000Z
'
,
other_addresses
:
{},
other_addresses
:
{},
...
...
stubs/ENS.ts
View file @
8dddaedd
...
@@ -8,6 +8,7 @@ export const ENS_DOMAIN: EnsDomainDetailed = {
...
@@ -8,6 +8,7 @@ export const ENS_DOMAIN: EnsDomainDetailed = {
name
:
'
kitty.cat.eth
'
,
name
:
'
kitty.cat.eth
'
,
token_id
:
'
0x686f4041f059de13c12563c94bd32b8edef9e4d86c931f37abb8cb69ecf25fd6
'
,
token_id
:
'
0x686f4041f059de13c12563c94bd32b8edef9e4d86c931f37abb8cb69ecf25fd6
'
,
owner
:
ADDRESS_PARAMS
,
owner
:
ADDRESS_PARAMS
,
wrapped_owner
:
null
,
resolved_address
:
ADDRESS_PARAMS
,
resolved_address
:
ADDRESS_PARAMS
,
registrant
:
ADDRESS_PARAMS
,
registrant
:
ADDRESS_PARAMS
,
registration_date
:
'
2023-12-20T01:29:12.000Z
'
,
registration_date
:
'
2023-12-20T01:29:12.000Z
'
,
...
...
types/api/ens.ts
View file @
8dddaedd
...
@@ -7,6 +7,9 @@ export interface EnsDomain {
...
@@ -7,6 +7,9 @@ export interface EnsDomain {
owner
:
{
owner
:
{
hash
:
string
;
hash
:
string
;
}
|
null
;
}
|
null
;
wrapped_owner
:
{
hash
:
string
;
}
|
null
;
registration_date
?:
string
;
registration_date
?:
string
;
expiry_date
:
string
|
null
;
expiry_date
:
string
|
null
;
}
}
...
...
ui/address/ensDomains/AddressEnsDomains.tsx
View file @
8dddaedd
...
@@ -38,11 +38,22 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
...
@@ -38,11 +38,22 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
}
}
const
mainDomain
=
data
.
items
.
find
((
domain
)
=>
domain
.
name
===
mainDomainName
);
const
mainDomain
=
data
.
items
.
find
((
domain
)
=>
domain
.
name
===
mainDomainName
);
const
ownedDomains
=
data
.
items
.
filter
((
domain
)
=>
const
ownedDomains
=
data
.
items
.
filter
((
domain
)
=>
{
domain
.
owner
&&
if
(
domain
.
name
===
mainDomainName
)
{
domain
.
owner
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
return
false
;
domain
.
name
!==
mainDomainName
,
}
);
if
(
domain
.
owner
&&
domain
.
owner
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
())
{
return
true
;
}
// include wrapped owner
if
(
domain
.
wrapped_owner
?.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
())
{
return
!
domain
.
resolved_address
||
domain
.
resolved_address
.
hash
.
toLowerCase
()
!==
addressHash
.
toLowerCase
();
}
return
false
;
});
const
resolvedDomains
=
data
.
items
.
filter
((
domain
)
=>
const
resolvedDomains
=
data
.
items
.
filter
((
domain
)
=>
domain
.
resolved_address
&&
domain
.
resolved_address
&&
domain
.
resolved_address
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
domain
.
resolved_address
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment