Closed BrianS111 closed 1 year ago
Before pic
After
I have a strange feeling this PR wont get accepted.. Seems like a simple fix to make everything work. Let me know if I went in the right direction or if you'd like a different solution. The priority is ENS > Lens > Wallet address
- The
peerAddressDisplay
prop is a manual override for what gets displayed so it shouldn't be removed- The
responsiveName
anduseEnsName
hooks should be removed in favor of theuseRelayId
hook (We don't need to use all 3, we can just use the 1).- The logic for deciding what to show should be straightforward: "if we have an ENS name show that, if we have a Lens name, show that, otherwise show the address"
useRelayId doesn't truncate anything and all 3 forms (ens, lens, address) need to be truncated 3 different ways, so I'm assuming I'll import truncateName, truncateAddress and write a new function for truncate lens and use those along with useRelayId and everything should work that way along with what you mentioned above. Does that sound about right? @killthebuddh4
useRelayId doesn't truncate anything and all 3 forms (ens, lens, address) need to be truncated 3 different ways, so I'm assuming I'll import truncateName, truncateAddress and write a new function for truncate lens and use those along with useRelayId and everything should work that way along with what you mentioned above. Does that sound about right? @killthebuddh4
Yep that sounds about right.
The code has been updated @killthebuddh4 Let me know if this works. It seems to be everything we discussed. I slightly adjusted the ens function in the address.ts so when it's truncated there are 3 dots instead of 4.
The output is the same as the screenshot I posted above
Closes https://github.com/relaycc/receiver/issues/114