From d7aedbd827bcb1da45a26049fa76d22539548775 Mon Sep 17 00:00:00 2001 From: Patrik Stas Date: Sun, 20 Aug 2023 23:59:31 +0200 Subject: [PATCH] Sync up nodejs Signed-off-by: Patrik Stas --- .../vcxagent-core/src/services/service-cred-issuer.js | 7 +------ wrappers/node/src/api/common.ts | 1 - wrappers/node/src/api/issuer-credential.ts | 8 -------- .../node/test/suite1/ariesvcx-issuer-credential.test.ts | 4 ---- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/agents/node/vcxagent-core/src/services/service-cred-issuer.js b/agents/node/vcxagent-core/src/services/service-cred-issuer.js index 635c4140d8..a1877f78cd 100644 --- a/agents/node/vcxagent-core/src/services/service-cred-issuer.js +++ b/agents/node/vcxagent-core/src/services/service-cred-issuer.js @@ -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 @@ -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) } diff --git a/wrappers/node/src/api/common.ts b/wrappers/node/src/api/common.ts index bb11d4f993..5de3995f02 100644 --- a/wrappers/node/src/api/common.ts +++ b/wrappers/node/src/api/common.ts @@ -138,7 +138,6 @@ export enum IssuerStateType { Initial = 0, ProposalReceived = 1, OfferSet = 2, - OfferSent = 3, RequestReceived = 4, CredentialSent = 5, Finished = 6, diff --git a/wrappers/node/src/api/issuer-credential.ts b/wrappers/node/src/api/issuer-credential.ts index d94d617ac0..6c5cabcf44 100644 --- a/wrappers/node/src/api/issuer-credential.ts +++ b/wrappers/node/src/api/issuer-credential.ts @@ -99,14 +99,6 @@ export class IssuerCredential extends VcxBaseWithState { - try { - return ffi.issuerCredentialMarkOfferMsgSent(this.handle); - } catch (err: any) { - throw new VCXInternalError(err); - } - } - public async buildCredentialOfferMsgV2({ credDef, attr, diff --git a/wrappers/node/test/suite1/ariesvcx-issuer-credential.test.ts b/wrappers/node/test/suite1/ariesvcx-issuer-credential.test.ts index 5ebbb61f13..3630100142 100644 --- a/wrappers/node/test/suite1/ariesvcx-issuer-credential.test.ts +++ b/wrappers/node/test/suite1/ariesvcx-issuer-credential.test.ts @@ -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 () => { @@ -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 () => {