|
|
@ -119,7 +119,7 @@ def write_set_options_op(w, msg: StellarSetOptionsOp):
|
|
|
|
elif msg.signer_type in consts.SIGN_TYPES:
|
|
|
|
elif msg.signer_type in consts.SIGN_TYPES:
|
|
|
|
writers.write_bool(w, True)
|
|
|
|
writers.write_bool(w, True)
|
|
|
|
writers.write_uint32(w, msg.signer_type)
|
|
|
|
writers.write_uint32(w, msg.signer_type)
|
|
|
|
writers.write_bytes_unchecked(w, msg.signer_key)
|
|
|
|
writers.write_bytes_fixed(w, msg.signer_key, 32)
|
|
|
|
writers.write_uint32(w, msg.signer_weight)
|
|
|
|
writers.write_uint32(w, msg.signer_weight)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise ProcessError("Stellar: unknown signer type")
|
|
|
|
raise ProcessError("Stellar: unknown signer type")
|
|
|
@ -146,10 +146,10 @@ def _write_asset_code(w, asset_type: int, asset_code: str):
|
|
|
|
return # nothing is needed
|
|
|
|
return # nothing is needed
|
|
|
|
elif asset_type == consts.ASSET_TYPE_ALPHANUM4:
|
|
|
|
elif asset_type == consts.ASSET_TYPE_ALPHANUM4:
|
|
|
|
# pad with zeros to 4 chars
|
|
|
|
# pad with zeros to 4 chars
|
|
|
|
writers.write_bytes_unchecked(w, code + bytearray([0] * (4 - len(code))))
|
|
|
|
writers.write_bytes_fixed(w, code + bytearray([0] * (4 - len(code))), 4)
|
|
|
|
elif asset_type == consts.ASSET_TYPE_ALPHANUM12:
|
|
|
|
elif asset_type == consts.ASSET_TYPE_ALPHANUM12:
|
|
|
|
# pad with zeros to 12 chars
|
|
|
|
# pad with zeros to 12 chars
|
|
|
|
writers.write_bytes_unchecked(w, code + bytearray([0] * (12 - len(code))))
|
|
|
|
writers.write_bytes_fixed(w, code + bytearray([0] * (12 - len(code))), 12)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise ProcessError("Stellar: invalid asset type")
|
|
|
|
raise ProcessError("Stellar: invalid asset type")
|
|
|
|
|
|
|
|
|
|
|
|