Ensure Bytes doesn't get double ellipsis (#7274)
This commit is contained in:
parent
9320c4c7aa
commit
70ac44edfa
@ -30,7 +30,6 @@ function extract (extrinsic?: SubmittableExtrinsic<'promise'> | null): [string,
|
||||
return [
|
||||
u8aToHex(u8a),
|
||||
extrinsic.registry.hash(u8a).toHex(),
|
||||
// 0x410284009a81870b7ba4774b2a7efc31a635ec4042088d97ecbdaaf9552c3e21f74aae5201122fea94623d7aecda9870009506865a666d8a962aa2b58f12d5b512258f1a0aab569d7982bfd616c90d7ccf6960dadb29c5de46d2da73a159f5c6bbd5206f8b85029c00040300429599ba5f521844f2332524dec987f9cfb116a2570f83b2417184af0c74ab130700743ba40b
|
||||
extrinsic.isSigned
|
||||
? extrinsic.inspect()
|
||||
: extrinsic.method.inspect()
|
||||
|
||||
@ -38,8 +38,8 @@ function Output ({ children, className = '', help, isDisabled, isError, isFull,
|
||||
withLabel={withLabel}
|
||||
>
|
||||
<div className={`ui--output ui dropdown selection ${isError ? ' error' : ''}${isMonospace ? ' monospace' : ''}${isDisabled ? 'isDisabled' : ''}`}>
|
||||
{isTrimmed && value && (value.length > 256)
|
||||
? `${value.substr(0, 96)}…${value.substr(-96)}`
|
||||
{isTrimmed && value && (value.length > 512)
|
||||
? `${value.substr(0, 256)}…${value.substr(-256)}`
|
||||
: value
|
||||
}
|
||||
{children}
|
||||
|
||||
@ -75,7 +75,7 @@ function BaseBytes ({ asHex, children, className = '', defaultValue: { value },
|
||||
? u8aToString(value)
|
||||
: isHex(value)
|
||||
? value
|
||||
: u8aToHex(value as Uint8Array, isDisabled ? 256 : -1)
|
||||
: u8aToHex(value as Uint8Array)
|
||||
: undefined
|
||||
);
|
||||
const [{ isAddress, isValid, lastValue }, setValidity] = useState<Validity>(() => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user