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

Correctly transform jsi value to ByteBuffer #176

Open
berendsliedrecht opened this issue Apr 1, 2023 · 0 comments
Open

Correctly transform jsi value to ByteBuffer #176

berendsliedrecht opened this issue Apr 1, 2023 · 0 comments

Comments

@berendsliedrecht
Copy link
Contributor

          Hmm, I see now that we do something like this:
auto json = jsiToValue<std::string>(rt, options, "json");

  ObjectHandle out;
  ByteBuffer b = stringToByteBuffer(json);

  ErrorCode code = anoncreds_revocation_registry_from_json(b, &out);
  auto returnValue = createReturnValue(rt, code, &out);

which should be

auto json = jsiToValue<ByteBuffer>(rt, options, "json");

  ObjectHandle out;

  ErrorCode code = anoncreds_revocation_registry_from_json(json, &out);
  auto returnValue = createReturnValue(rt, code, &out);

it does not change a lot of the code, but this is more inline way of doing it. (not an issue for now, but we can clean this up in the future).

Originally posted by @blu3beri in #175 (comment)

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

1 participant