diff --git a/package.json b/package.json index a480006..f382719 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ }, "safe_app": { "mirror": "https://s3.eu-west-2.amazonaws.com/safe-client-libs", - "version": "d5d9253", + "version": "57f3afb", "targetDir": "src/native", "filename": "safe_app", "filePattern": "^.*\\.(dll|so|dylib)$", diff --git a/src/api/auth.js b/src/api/auth.js index a14636c..b89e9f8 100644 --- a/src/api/auth.js +++ b/src/api/auth.js @@ -189,7 +189,7 @@ class AuthInterface { */ /* eslint-disable class-methods-use-this */ genConnUri() { - return lib.encode_unregistered_req() + return lib.encode_unregistered_req(this.app.appInfo.id) .then(addSafeAuthProtocol); } diff --git a/src/native/_auth.js b/src/native/_auth.js index f1a405f..2c30611 100644 --- a/src/native/_auth.js +++ b/src/native/_auth.js @@ -190,7 +190,7 @@ module.exports = { encode_auth_req: [t.Void, [ ref.refType(AuthReq), 'pointer', 'pointer'] ], encode_containers_req: [t.Void, [ref.refType(ContainerReq), 'pointer', 'pointer'] ], encode_share_mdata_req: [t.Void, [ref.refType(ShareMDataReq), 'pointer', 'pointer'] ], - encode_unregistered_req: [t.Void, ['pointer', 'pointer'] ], + encode_unregistered_req: [t.Void, [t.u8Pointer, t.usize, 'pointer', 'pointer'] ], decode_ipc_msg: [t.Void, [ 'string', // (msg: *const c_char, t.VoidPtr, // user_data: *mut c_void, @@ -234,7 +234,10 @@ module.exports = { encode_containers_req: helpers.Promisified(null, ['uint32', 'char *'], remapEncodeValues), encode_auth_req: helpers.Promisified(null, ['uint32', 'char *'], remapEncodeValues), encode_share_mdata_req: helpers.Promisified(null, ['uint32', 'char *'], remapEncodeValues), - encode_unregistered_req: helpers.Promisified(null, ['uint32', 'char *'], remapEncodeValues), + encode_unregistered_req: helpers.Promisified((appId) => { + let str = new Buffer(appId); + return [str, str.length]; + }, ['uint32', 'char *'], remapEncodeValues), decode_ipc_msg: (lib, fn) => { return ((str) => { return new Promise((resolve, reject) => {