Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add extension to js_serializer #1133

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

oxarbitrage
Copy link
Member

this pull is a replacement for #966 for issue #947

here is how it looks now. for call_order_update:

call_order_update_operation_options = new Serializer(
    "call_order_update_operation_options"
    target_collateral_ratio: optional uint16
)

call_order_update = new Serializer(
    "call_order_update"
    fee: asset
    funding_account: protocol_id_type "account"
    delta_collateral: asset
    delta_debt: asset
    extensions: call_order_update_operation_extensions
)

for account_create:

account_create_operation_ext = new Serializer(
    "account_create_operation_ext"
    null_ext: optional void
    owner_special_authority: optional static_variant [
    no_special_authority
    top_holders_special_authority
]
    active_special_authority: optional static_variant [
    no_special_authority
    top_holders_special_authority
]
    buyback_options: optional buyback_account_options
)

account_create = new Serializer(
    "account_create"
    fee: asset
    registrar: protocol_id_type "account"
    referrer: protocol_id_type "account"
    referrer_percent: uint16
    name: string
    owner: authority
    active: authority
    options: account_options
    extensions: account_create_operation_extensions
)

and for account_update:

account_update_operation_ext = new Serializer(
    "account_update_operation_ext"
    null_ext: optional void
    owner_special_authority: optional static_variant [
    no_special_authority
    top_holders_special_authority
]
    active_special_authority: optional static_variant [
    no_special_authority
    top_holders_special_authority
]
)

account_update = new Serializer(
    "account_update"
    fee: asset
    account: protocol_id_type "account"
    owner: optional authority
    active: optional authority
    new_options: optional account_options
    extensions: account_update_operation_extensions
)

Problem i see is that the new serializers don't have the exact same name as the extension field(account_update_operation_extensions is serialized as account_update_operation_ext.

As i dont know exactly how this is used by the UI i am unsure if it is an issue or not.

Copy link
Member

@cogutvalera cogutvalera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Seems all is OK here.
All tests have passed with No errors detected. Nice job ! Well done ! Thanks !

PS: just require rebase.

@abitmore abitmore mentioned this pull request Apr 5, 2019
17 tasks
@pmconrad
Copy link
Contributor

Closed #947 in favour of #1701 - perhaps this PR can be integrated into a broader solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants