fix: in pdf marking if counterpart does not have any of name, displayname, username then show pubkey
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s

This commit is contained in:
daniyal 2024-08-21 00:43:41 +05:00
parent 2c18c51029
commit 42d74c656a

View File

@ -420,12 +420,10 @@ export const DrawPDFFields = (props: Props) => {
{users
.filter((u) => u.role === UserRole.signer)
.map((user, index) => {
let displayValue = truncate(
hexToNpub(user.pubkey),
{
length: 16
}
)
const npub = hexToNpub(user.pubkey)
let displayValue = truncate(npub, {
length: 16
})
const metadata = props.metadata[user.pubkey]
@ -433,7 +431,8 @@ export const DrawPDFFields = (props: Props) => {
displayValue = truncate(
metadata.name ||
metadata.display_name ||
metadata.username,
metadata.username ||
npub,
{
length: 16
}