This commit is contained in:
Josep M Sobrepere
2024-11-10 11:58:33 +07:00
parent 1a23ce2168
commit 1333464bc6

View File

@@ -195,12 +195,21 @@ const StorageKeyInput: FC<{ idx: number; type: number; disabled: boolean }> = ({
if (!builder) return null
const codec = builder.buildDefinition(type)
const binaryValue =
(value.type === CodecComponentType.Initial
? value.value
: value.value.empty
? null
: (value.value.encoded ?? codec.enc(value.value.decoded))) ?? null
console.log("decoded", value)
const getBinValue = () => {
try {
return (
(value.type === CodecComponentType.Initial
? value.value
: value.value.empty
? null
: (value.value.encoded ?? codec.enc(value.value.decoded))) ?? null
)
} catch {
null
}
}
const binaryValue = getBinValue()
const getTypeName = () => {
const lookupEntry = builder.lookup(type)