Skip to content

Commit

Permalink
fix(js): convert seqNo to -1 if 0 (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoGlastra authored Mar 31, 2024
1 parent e4a7316 commit d8a189a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions wrappers/javascript/indy-vdr-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/indy-vdr-nodejs",
"version": "0.2.0",
"version": "0.2.1",
"license": "Apache-2.0",
"description": "Nodejs wrapper for Indy Vdr",
"source": "src/index",
Expand Down Expand Up @@ -40,10 +40,10 @@
"typescript": "~4.9.4"
},
"dependencies": {
"@hyperledger/indy-vdr-shared": "0.2.0",
"@mapbox/node-pre-gyp": "^1.0.10",
"@2060.io/ffi-napi": "4.0.8",
"@2060.io/ref-napi": "3.0.6",
"@hyperledger/indy-vdr-shared": "0.2.1",
"@mapbox/node-pre-gyp": "^1.0.10",
"ref-array-di": "^1.2.2",
"ref-struct-di": "^1.1.1"
},
Expand Down
4 changes: 3 additions & 1 deletion wrappers/javascript/indy-vdr-react-native/cpp/indyVdr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ jsi::Value buildGetNymRequest(jsi::Runtime &rt, jsi::Object options) {
auto seqNo = jsiToValue<int32_t>(rt, options, "seqNo", true);
auto timestamp = jsiToValue<int64_t>(rt, options, "timestamp", true);

auto convertedSeqNo = seqNo == 0 ? -1 : seqNo;

RequestHandle out;

ErrorCode code = indy_vdr_build_get_nym_request(
submitterDid.length() > 0 ? submitterDid.c_str() : nullptr, dest.c_str(),
seqNo, timestamp, &out);
convertedSeqNo, timestamp, &out);

return createReturnValue(rt, code, &out);
};
Expand Down
4 changes: 2 additions & 2 deletions wrappers/javascript/indy-vdr-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/indy-vdr-react-native",
"version": "0.2.0",
"version": "0.2.1",
"license": "Apache-2.0",
"description": "React Native wrapper for Indy Vdr",
"source": "src/index",
Expand Down Expand Up @@ -40,7 +40,7 @@
"install": "node-pre-gyp install"
},
"dependencies": {
"@hyperledger/indy-vdr-shared": "0.2.0",
"@hyperledger/indy-vdr-shared": "0.2.1",
"@mapbox/node-pre-gyp": "^1.0.10"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export interface NativeBindings {
dest: string
didDocContent?: string
version?: number
seqNo?: number
}): ReturnObject<RequestHandle>

buildGetSchemaRequest(options: { submitterDid?: string; schemaId: string }): ReturnObject<RequestHandle>
Expand Down
2 changes: 1 addition & 1 deletion wrappers/javascript/indy-vdr-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/indy-vdr-shared",
"version": "0.2.0",
"version": "0.2.1",
"license": "Apache-2.0",
"description": "Shared library for using Indy VDR with NodeJS and React Native",
"main": "build/index",
Expand Down
2 changes: 1 addition & 1 deletion wrappers/javascript/lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"packages": ["indy-vdr-*"],
"version": "0.2.0",
"version": "0.2.1",
"npmClient": "yarn",
"command": {
"version": {
Expand Down

0 comments on commit d8a189a

Please sign in to comment.