Add removed comment from valueToText (#10477)

This commit is contained in:
Tarik Gul 2024-04-16 09:09:12 -07:00 committed by GitHub
parent de6c21b9da
commit 6fcaea68a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,6 +68,8 @@ export default function valueToText (type: string, value: Codec | undefined | nu
// eslint-disable-next-line @typescript-eslint/unbound-method
['Bytes', 'Raw', 'Option<Keys>', 'Keys'].includes(type) && isFunction(value.toU8a)
? u8aToHex(value.toU8a(true))
// HACK Handle Keys as hex-only (this should go away once the node value is
// consistently swapped to `Bytes`)
: type === 'Vec<(ValidatorId,Keys)>'
? toHumanJson(formatKeys(value as unknown as [ValidatorId, Keys][]))
: value instanceof Raw