mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-24 22:25:48 +00:00
respond to comments
This commit is contained in:
@@ -96,8 +96,6 @@ class STObject extends SerializedType {
|
|||||||
const list: BytesList = new BytesList()
|
const list: BytesList = new BytesList()
|
||||||
const bytes: BinarySerializer = new BinarySerializer(list)
|
const bytes: BinarySerializer = new BinarySerializer(list)
|
||||||
|
|
||||||
let isUnlModify = false
|
|
||||||
|
|
||||||
const xAddressDecoded = Object.entries(value).reduce((acc, [key, val]) => {
|
const xAddressDecoded = Object.entries(value).reduce((acc, [key, val]) => {
|
||||||
let handled: JsonObject | undefined = undefined
|
let handled: JsonObject | undefined = undefined
|
||||||
if (val && isValidXAddress(val.toString())) {
|
if (val && isValidXAddress(val.toString())) {
|
||||||
@@ -127,9 +125,8 @@ class STObject extends SerializedType {
|
|||||||
const associatedValue = field.associatedType.from(
|
const associatedValue = field.associatedType.from(
|
||||||
xAddressDecoded[field.name],
|
xAddressDecoded[field.name],
|
||||||
)
|
)
|
||||||
if ((associatedValue as unknown as Bytes).name === 'UNLModify') {
|
const isUnlModify =
|
||||||
isUnlModify = true
|
(associatedValue as unknown as Bytes).name === 'UNLModify'
|
||||||
}
|
|
||||||
const isUnlModifyWorkaround = field.name == 'Account' && isUnlModify
|
const isUnlModifyWorkaround = field.name == 'Account' && isUnlModify
|
||||||
bytes.writeFieldAndValue(field, associatedValue, isUnlModifyWorkaround)
|
bytes.writeFieldAndValue(field, associatedValue, isUnlModifyWorkaround)
|
||||||
if (field.type.name === ST_OBJECT) {
|
if (field.type.name === ST_OBJECT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user