Skip to content

Commit

Permalink
Made node wrapper serialize a connection as a JSON object instead of …
Browse files Browse the repository at this point in the history
…string

Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
  • Loading branch information
bobozaur committed Feb 9, 2023
1 parent afd198d commit 3cb83fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wrappers/node/src/api/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class NonmediatedConnection extends VcxBaseWithState<INonmeditatedConnect
throw new VCXInternalError(err);
}
}

public async sendAriesMessage(content: string): Promise<void> {
try {
return await ffiNapi.connectionSendAriesMessage(this.handle, content);
Expand Down Expand Up @@ -190,7 +190,7 @@ export class NonmediatedConnection extends VcxBaseWithState<INonmeditatedConnect
};
protected _getStFn = ffiNapi.connectionGetState;
protected _serializeFn = (handle: number): string => {
const data = ffiNapi.connectionSerialize(handle);
const data = JSON.parse(ffiNapi.connectionSerialize(handle));
return JSON.stringify({ data, source_id: this.sourceId, version: '1.0' });
}
protected _deserializeFn = ffiNapi.connectionDeserialize;
Expand Down

0 comments on commit 3cb83fb

Please sign in to comment.