mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 16:45:49 +00:00
@@ -96,6 +96,8 @@ 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())) {
|
||||||
@@ -125,8 +127,9 @@ class STObject extends SerializedType {
|
|||||||
const associatedValue = field.associatedType.from(
|
const associatedValue = field.associatedType.from(
|
||||||
xAddressDecoded[field.name],
|
xAddressDecoded[field.name],
|
||||||
)
|
)
|
||||||
const isUnlModify =
|
if ((associatedValue as unknown as Bytes).name === 'UNLModify') {
|
||||||
(associatedValue as unknown as Bytes).name === 'UNLModify'
|
isUnlModify = true
|
||||||
|
}
|
||||||
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