Revert "respond to comments"

This reverts commit 689768bbf1.
This commit is contained in:
Mayukha Vadari
2021-11-30 14:41:57 -05:00
parent 689768bbf1
commit c657e22304

View File

@@ -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) {