ens-usernames icon indicating copy to clipboard operation
ens-usernames copied to clipboard

2 transactions required to save changes when editing name

Open asemiankevich opened this issue 6 years ago • 3 comments

When i edit contact code for example and try to save changes - 2 transactions are done in a row, however i expect 1

image

asemiankevich avatar Sep 12 '18 13:09 asemiankevich

@rachelhamlin Is this still v1 if we are removing editing?

@3esmit Does it make sense to add a method to the Username Registrar contract that allows both fields to be updated in one call before the contract is finalized?

bgits avatar Oct 10 '18 21:10 bgits

Good point, if only during the edit flow, let's take it off.

rachelhamlin avatar Oct 11 '18 11:10 rachelhamlin

The reason is because each change of ENS Resolver is a single transaction. This could be fixed through a contract upgrade that would take back the ownership of subdomain, make the changes in the resolver and then give back the ownership of the subdomain. Other possible solution would be possible with Identity contract, if it support multisend (a option within the contract to make multiple calls) then this would be fixed in another layer. Also a new resolver could be developed that supports changing multiple fields with one call.

The reason for this problem is because PublicResolver can only be edited by the owner of that subdomain, and each change is a separate call.

This could be mitigated if the Dapp checks if the current field is the same as in PublicResolver and only requesting calls to what changed - also correctly loading the fields that are already in the PublicResolver and warning if is different from current user.

3esmit avatar Nov 06 '18 17:11 3esmit