-
Notifications
You must be signed in to change notification settings - Fork 363
Display readable names for known addresses #2816
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
[warning] react-hooks/exhaustive-deps
Report generated by eslint-plus-action |
E2E Tests Passed |
setType({ icon: isSendTx ? OutgoingTxIcon : IncomingTxIcon, text: isSendTx ? 'Send' : 'Receive' }) | ||
|
||
const icon = isSendTx ? OutgoingTxIcon : IncomingTxIcon | ||
const text = toAddress?.name ?? isSendTx ? 'Send' : 'Receive' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if there's no name it won't display anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will show 'Send' or 'Receive' as it was before.
const icon = knownAddress.isAddressBook | ||
? CustomTxIcon | ||
: knownAddress.image ?? toAddress?.logoUri ?? CustomTxIcon | ||
const text = knownAddress.isAddressBook ? knownAddress.name : toAddress?.name ?? 'Contract interaction' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just
const text = knownAddress.name || toAddress?.name || 'Contract interaction'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looketh Goode!
|
||
setType({ | ||
icon: isSendTx ? OutgoingTxIcon : IncomingTxIcon, | ||
text: knownAddressBookAddress.name || toAddress?.name || isSendTx ? 'Send' : 'Receive', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes: Also I cannot use mainnet prod and this mainnet prod because its services are different, therefore they might show different names, like this: The following is a comparison between this PR and pr2793 that doesn't have this fix. First is shown how in the Other PR the name is "Sent" and in this new one the name is the "known name". Here I was only able to check it by sending funds to those known addresses, but any type of "contract interaction" type of tx were, in both PRs, have the name recognized just fine So far it looks fine, but I'll check with Liliya if she has a safe where we can see something in the history where those known |
This is a safe with named transactions. I believe it's Liliya's. |
Checked that safe, and yes, it shows known addresses as well, (mostly a lili's safe that was added to the list) Looks good to me |
This ticket was kicked back since it seems that there are more requirements that were not fulfilled. We have to check what is the real scope of this ticket |
Please see my comment here. @francovenica |
@iamacook , @katspaugh "known addresses" were missed on transaction details for incoming/outgoing txs |
What it solves
Resolves #1866 (showing names in transaction lists)
How this PR fixes it
Instead of the default text (now used as fallback), the
name
/logoUri
in each transaction is displayed in the transaction list. If a name is present in the address book, that takes priority.How to test it
Open historical/queued transactions and check that there are names/logos.
Screenshots