Skip to content

JS: Constant SC_SPEC_DOC_LIMIT doesn't get replaced with a JavaScript XDR constant #152

@wildework

Description

@wildework

What version are you using?

I'm using the 6e42b01e1ceb25c251d4c4d45443d7e0f228822a commit version.

What did you do?

From the root folder of the repository, I call xdrgen.

./bin/xdrgen -o ../stellar_sdk/xdr -l javascript -n stellar ../stellar-xdr/*.x

Every instance of SC_SPEC_DOC_LIMIT is not replaced with a constant lookup, here's one example.

struct SCSpecUDTStructFieldV0
{
    string doc<SC_SPEC_DOC_LIMIT>;
    string name<30>;
    SCSpecTypeDef type;
};

What did you expect to see?

xdr.struct("ScSpecUdtStructFieldV0", [
  ["doc", xdr.string(xdr.lookup("SC_SPEC_DOC_LIMIT"))],
  ["name", xdr.string(30)],
  ["type", xdr.lookup("ScSpecTypeDef")],
]);

What did you see instead?

xdr.struct("ScSpecUdtStructFieldV0", [
  ["doc", xdr.string(SC_SPEC_DOC_LIMIT)],
  ["name", xdr.string(30)],
  ["type", xdr.lookup("ScSpecTypeDef")],
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions