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

Serializer generator does not recognize op_wrapper #439

Closed
jcalfee opened this issue Nov 9, 2015 · 3 comments
Closed

Serializer generator does not recognize op_wrapper #439

jcalfee opened this issue Nov 9, 2015 · 3 comments
Assignees
Milestone

Comments

@jcalfee
Copy link

jcalfee commented Nov 9, 2015

./js_operation_serializer generates the following:

proposal_create = new Serializer( 
    "proposal_create"
    fee: asset
    fee_paying_account: protocol_id_type "account"
    expiration_time: time_point_sec
    proposed_ops: array operation 
    review_period_seconds: optional uint32
    extensions: set future_extensions
)

This will not include the op variable was expected here:

json:

"proposed_ops":[{"op":[0,{"fee":

c++

struct proposal_create_operation : public base_operation
   {
       ...
       asset              fee;
       account_id_type    fee_paying_account;
       vector<op_wrapper> proposed_ops;
       ...
   }
   /**
    *  @brief necessary to support nested operations inside the proposal_create_operation
    */
   struct op_wrapper
   {
      public:
         op_wrapper(const operation& op = operation()):op(op){}
         operation op;
   };

} } // graphene::chain

FC_REFLECT_TYPENAME( graphene::chain::operation )
FC_REFLECT( graphene::chain::op_wrapper, (op) )
@theoreticalbts
Copy link
Contributor

Under the new guidelines, this patch needs review: https://github.com/cryptonomex/graphene/wiki/How-we-use-version-control

Also it needs to be rebased to stable (if possible).

@jcalfee
Copy link
Author

jcalfee commented Nov 10, 2015

This is safe to merge anywhere.. It only effects the generated javascript serialization file that gets manually ran then compared and checked into graphene-ui.

@theoreticalbts theoreticalbts added this to the next milestone Nov 23, 2015
@theoreticalbts
Copy link
Contributor

Looks good.

pmconrad pushed a commit to pmconrad/graphene that referenced this issue Dec 22, 2017
pmconrad pushed a commit to pmconrad/graphene that referenced this issue Dec 22, 2017
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

No branches or pull requests

2 participants