feat(APP-795): Integrate Aragon subdomain and implement Aragon profile renaming#1175
feat(APP-795): Integrate Aragon subdomain and implement Aragon profile renaming#1175milosh86 wants to merge 20 commits into
Conversation
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
|
🚀 Preview Deployment: View Here |
|
E2E results (preview) Smoke
|
Signed-off-by: Milos Dzepina <milos@aragon.org>
Signed-off-by: Milos Dzepina <milos@aragon.org>
| records: { | ||
| textRecords: allTextRecords ?? [], | ||
| addr: address, | ||
| contenthash: '0x', |
There was a problem hiding this comment.
Think we've got a data-loss issue here 👀 — contenthash: '0x' wipes any existing contenthash, and addr is the connected wallet rather than the name's current addr record. On top of that getEnsTextRecords only pulls text records, so addr/contenthash never get read from the profile at all.
Since the AC is "move all records", we should fetch the full Records (text + addr + contenthash) for the current name and pass them through unchanged. Worth testing against a profile that actually has a contenthash set so we don't silently nuke it on rename.
There was a problem hiding this comment.
One more edge case here: the SDK returns [] both when a profile genuinely has no text records and when the name/resolver isn’t found. That means indexer lag or a lookup miss would still enable submit and we could pass an empty textRecords array into move.
Could we make the records response distinguish “found with zero records” from “not found”, and only enable the rename once we know we loaded the current profile successfully?
| if (endpoint == null) { | ||
| throw new Error('Envio endpoint is not set'); | ||
| } |
There was a problem hiding this comment.
This throws at import time, before the route's try/catch can catch it — so a missing endpoint surfaces as an opaque import crash instead of a clean 500. Fine if we trust deploy config, but can we double-check both new secrets are set in every preview/prod env where the profile dialog renders?
Also apiToken has no null check before it goes into EnvioClient — intentional (token's optional) or a miss?
| getMemberProfileTextRecords: '/member-profile/:name/records', | ||
| }; | ||
|
|
||
| getEnsTextRecords = async (params: IGetEnsTextRecordsParams) => { |
There was a problem hiding this comment.
The new service + both dialogs land without any tests — we should add a couple. Most valuable would be one asserting the encoded move args (that'd catch the records issue above), plus the button-hidden-for-personal-ENS case. userDialog.test.tsx is a good template.
| abi: memberRegistryAbi, | ||
| functionName: 'move', | ||
| args: [subdomain], | ||
| args: [subdomain, records], |
There was a problem hiding this comment.
move is overloaded in the ABI now (move(string) + move(string, Records)) — viem picks the right one by arg count so this works, just flagging the single-arg version has no callers left. Intentional to keep it around?
|
|
||
| interface IRequestOptions { | ||
| /** | ||
| * Parameters of the RPC request call. |
There was a problem hiding this comment.
Looks like a copy-paste from the RPC routes — this one's Envio GraphQL, not RPC.
| * Parameters of the RPC request call. | |
| * Parameters of the request call. |
| textRecords: (params: IGetEnsTextRecordsParams) => [ | ||
| MemberProfileServiceKey.TEXT_RECORDS, | ||
| params, | ||
| ], |
There was a problem hiding this comment.
This key skips apiVersionUtils.getApiVersion() that our other service keys include — fine if this endpoint is intentionally version-stable, otherwise we should align it so cache busts on version bumps.
Description
aragon-subdomainintegration (see the section below)Integration approach:
aragon-subdomain, instead of re-implementing the same interfacesapi.tsfile implements all "params" interfacesAragonSubdomainServiceClientaragonSubdomainServiceBackend, which is basically instantiated AragonDomainControllerqueryClient.fetchQuery(queryOptions()), we have.server.tsquery file which exports only a function for generating server component query options. It reuses client function completely plus it adds newqueryFnType of Change
Developer Checklist: