Skip to content

Commit

Permalink
Sync up nodejs
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
  • Loading branch information
Patrik-Stas committed Aug 20, 2023
1 parent 50c014a commit d7aedbd
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ module.exports.createServiceCredIssuer = function createServiceCredIssuer ({ log
})
const state1 = await issuerCred.getState()
assert.equal(state1, IssuerStateType.OfferSet)
const credOfferMsg = await issuerCred.getCredentialOfferMsg()
await issuerCred.markCredentialOfferMsgSent()
const state2 = await issuerCred.getState()
assert.equal(state2, IssuerStateType.OfferSent)
const credOfferMsg = issuerCred.getCredentialOfferMsg()
await saveIssuerCredential(issuerCredId, issuerCred)

return credOfferMsg
Expand All @@ -44,8 +41,6 @@ module.exports.createServiceCredIssuer = function createServiceCredIssuer ({ log
const state1 = await issuerCred.getState()
assert.equal(state1, IssuerStateType.OfferSet)
await issuerCred.sendOfferV2(connection)
const state2 = await issuerCred.getState()
assert.equal(state2, IssuerStateType.OfferSent)
await saveIssuerCredential(issuerCredId, issuerCred)
}

Expand Down
1 change: 0 additions & 1 deletion wrappers/node/src/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export enum IssuerStateType {
Initial = 0,
ProposalReceived = 1,
OfferSet = 2,
OfferSent = 3,
RequestReceived = 4,
CredentialSent = 5,
Finished = 6,
Expand Down
8 changes: 0 additions & 8 deletions wrappers/node/src/api/issuer-credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ export class IssuerCredential extends VcxBaseWithState<IIssuerCredentialData, Is
}
}

public async markCredentialOfferMsgSent(): Promise<void> {
try {
return ffi.issuerCredentialMarkOfferMsgSent(this.handle);
} catch (err: any) {
throw new VCXInternalError(err);
}
}

public async buildCredentialOfferMsgV2({
credDef,
attr,
Expand Down
4 changes: 0 additions & 4 deletions wrappers/node/test/suite1/ariesvcx-issuer-credential.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ describe('IssuerCredential:', () => {
assert.equal(await issuerCredential.getState(), IssuerStateType.OfferSet);
const connection = await createConnectionInviterRequested();
await issuerCredential.sendOfferV2(connection);
assert.equal(await issuerCredential.getState(), IssuerStateType.OfferSent);
});

it('build offer and mark as sent', async () => {
Expand All @@ -96,9 +95,6 @@ describe('IssuerCredential:', () => {
offer.credential_preview['@type'],
'https://didcomm.org/issue-credential/1.0/credential-preview',
);

await issuerCredential.markCredentialOfferMsgSent();
assert.equal(await issuerCredential.getState(), IssuerStateType.OfferSent);
});

it('throws: not initialized', async () => {
Expand Down

0 comments on commit d7aedbd

Please sign in to comment.