Skip to content

Commit

Permalink
Merge pull request #235 from andrewwhitehead/fix/ffi-rev-info
Browse files Browse the repository at this point in the history
Remove tails path from FfiCredRevInfo
  • Loading branch information
andrewwhitehead authored Aug 18, 2023
2 parents ddcc9be + c101592 commit bbd6b88
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion include/libanoncreds.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ typedef struct FfiCredRevInfo {
ObjectHandle reg_def;
ObjectHandle reg_def_private;
int64_t reg_idx;
FfiStr tails_path;
} FfiCredRevInfo;

typedef struct FfiCredentialEntry {
Expand Down
3 changes: 1 addition & 2 deletions src/ffi/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ use crate::services::{

#[derive(Debug)]
#[repr(C)]
pub struct FfiCredRevInfo<'a> {
pub struct FfiCredRevInfo {
reg_def: ObjectHandle,
reg_def_private: ObjectHandle,
reg_idx: i64,
tails_path: FfiStr<'a>,
}

struct RevocationConfig {
Expand Down
1 change: 1 addition & 0 deletions wrappers/javascript/anoncreds-nodejs/test/bindings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ describe('bindings', () => {
objectHandle: revocationRegistryDefinition,
name: 'tails_location',
})
expect(tailsPath).toBeTruthy()

const timeCreateRevStatusList = 12
const revocationStatusList = anoncreds.createRevocationStatusList({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ typedef struct FfiCredRevInfo {
ObjectHandle reg_def;
ObjectHandle reg_def_private;
int64_t reg_idx;
FfiStr tails_path;
} FfiCredRevInfo;

typedef struct FfiCredentialEntry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,10 @@ FfiCredRevInfo jsiToValue(jsi::Runtime &rt, jsi::Object &options,
rt, valueAsObject, "registryDefinitionPrivate");
auto registryIndex =
jsiToValue<int64_t>(rt, valueAsObject, "registryIndex");
auto tailsPath = jsiToValue<std::string>(rt, valueAsObject, "tailsPath");

return FfiCredRevInfo{.reg_def = registryDefinition,
.reg_def_private = registryDefinitionPrivate,
.reg_idx = registryIndex,
.tails_path = tailsPath.c_str()};
.reg_idx = registryIndex};
}

throw jsi::JSError(rt, errorPrefix + name + errorInfix +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ import type { RevocationRegistryDefinition } from './RevocationRegistryDefinitio
import { AnoncredsObject } from '../AnoncredsObject'
import { anoncreds } from '../register'

export type RevokeCredentialOptions = {
revocationRegistryDefinition: RevocationRegistryDefinition
credentialRevocationIndex: number
tailsPath: string
}

export type UpdateRevocationRegistryOptions = {
revocationRegistryDefinition: RevocationRegistryDefinition
issued: number[]
Expand Down

0 comments on commit bbd6b88

Please sign in to comment.