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

fix: incorrect revocation registry id #180

Merged
merged 1 commit into from
Apr 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions wrappers/javascript/indy-vdr-react-native/cpp/indyVdr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,56 +145,56 @@ jsi::Value buildGetCredDefRequest(jsi::Runtime &rt, jsi::Object options) {
jsi::Value buildGetRevocRegDefRequest(jsi::Runtime &rt, jsi::Object options) {
auto submitterDid =
jsiToValue<std::string>(rt, options, "submitterDid", true);
auto revocRegId = jsiToValue<std::string>(rt, options, "revocRegId");
auto revocationRegistryId = jsiToValue<std::string>(rt, options, "revocationRegistryId");

RequestHandle out;

ErrorCode code = indy_vdr_build_get_revoc_reg_def_request(
submitterDid.length() > 0 ? submitterDid.c_str() : nullptr,
revocRegId.c_str(), &out);
revocationRegistryId.c_str(), &out);

return createReturnValue(rt, code, &out);
};

jsi::Value buildGetRevocRegRequest(jsi::Runtime &rt, jsi::Object options) {
auto submitterDid =
jsiToValue<std::string>(rt, options, "submitterDid", true);
auto revocRegId = jsiToValue<std::string>(rt, options, "revocRegId");
auto revocationRegistryId = jsiToValue<std::string>(rt, options, "revocationRegistryId");
auto timestamp = jsiToValue<int64_t>(rt, options, "timestamp");

RequestHandle out;

ErrorCode code = indy_vdr_build_get_revoc_reg_request(
submitterDid.length() > 0 ? submitterDid.c_str() : nullptr,
revocRegId.c_str(), timestamp, &out);
revocationRegistryId.c_str(), timestamp, &out);

return createReturnValue(rt, code, &out);
};

jsi::Value buildGetRevocRegDeltaRequest(jsi::Runtime &rt, jsi::Object options) {
auto submitterDid =
jsiToValue<std::string>(rt, options, "submitterDid", true);
auto revocRegId = jsiToValue<std::string>(rt, options, "revocRegId");
auto revocationRegistryId = jsiToValue<std::string>(rt, options, "revocationRegistryId");
auto fromTs = jsiToValue<int64_t>(rt, options, "fromTs", true);
auto toTs = jsiToValue<int64_t>(rt, options, "toTs");

RequestHandle out;

ErrorCode code = indy_vdr_build_get_revoc_reg_delta_request(
submitterDid.length() > 0 ? submitterDid.c_str() : nullptr,
revocRegId.c_str(), fromTs, toTs, &out);
revocationRegistryId.c_str(), fromTs, toTs, &out);

return createReturnValue(rt, code, &out);
};

jsi::Value buildRevocRegDefRequest(jsi::Runtime &rt, jsi::Object options) {
auto submitterDid = jsiToValue<std::string>(rt, options, "submitterDid");
auto revocRegId = jsiToValue<std::string>(rt, options, "revocRegId");
auto revocationRegistryId = jsiToValue<std::string>(rt, options, "revocationRegistryId");

RequestHandle out;

ErrorCode code = indy_vdr_build_revoc_reg_def_request(
submitterDid.c_str(), revocRegId.c_str(), &out);
submitterDid.c_str(), revocationRegistryId.c_str(), &out);

return createReturnValue(rt, code, &out);
};
Expand Down