-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webapp): display fio address instead of owner value #1421
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ const CustomBarLabel = memo( | |
fontFamily="Roboto, Helvetica, Arial, sans-serif;" | ||
fontWeight={isProducing ? 'bold' : 'normal'} | ||
> | ||
{payload.owner} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The substring operation truncates names but doesn't account for the possibility of cutting in the middle of a multi-byte character. This could cause display issues. Consider using a proper truncation library that handles multi-byte and multi-codepoint characters. |
||
{payload.name ? payload.name?.replace('@fiotestnet','')?.substring(0, 12) + '...' : payload.owner} | ||
</text> | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ const ProfileCard = ({ producer }) => { | |
<div className={classes.profile}> | ||
<ProducerName | ||
name={producer?.media?.name || producer?.owner} | ||
account={producer?.media?.name ? producer?.owner : ''} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is fine but it would be better to escape the |
||
account={producer?.media?.name ? (producer?.fio_address || producer?.owner) : ''} | ||
text={t('BPonNetwork', { | ||
networkName: eosConfig.networkLabel, | ||
position: producer?.media?.account, | ||
|
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.
This change is fine but it would be better to escape the
fio_address
andowner
to prevent potential XSS attacks. Consider using a library like DOMPurify.