From 370dafe3f59a6da723164abec7fc956eb1bb48f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9cio=20Varj=C3=A3o?= <1348549+cvarjao@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:45:02 +0000 Subject: [PATCH] fix OOB proofs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Clécio Varjão <1348549+cvarjao@users.noreply.github.com> --- .github/dependabot.yml | 12 ++++++++++++ .gitignore | 3 ++- src/AgentCredo.ts | 6 +++--- src/AgentTraction.ts | 4 +++- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/.gitignore b/.gitignore index 509c731..69233a4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ invitation_url.txt invitation.json invite-acm.json tmp/ -*.json +/*.json +.DS_Store diff --git a/src/AgentCredo.ts b/src/AgentCredo.ts index 66cf529..41061da 100644 --- a/src/AgentCredo.ts +++ b/src/AgentCredo.ts @@ -324,12 +324,12 @@ export class AgentCredo implements AriesAgent { this.agent = await createAgent(this.config, this.ledgers, this.logger); } public async shutdown() { - await this.agent.mediationRecipient.stopMessagePickup(); + await this.agent.mediationRecipient?.stopMessagePickup(); await this.agent.shutdown(); - for (const t of this.agent.outboundTransports) { + for (const t of this.agent?.outboundTransports) { await t.stop(); } - for (const t of this.agent.inboundTransports) { + for (const t of this.agent?.inboundTransports) { await t.stop(); } } diff --git a/src/AgentTraction.ts b/src/AgentTraction.ts index c89e6ab..79107ba 100644 --- a/src/AgentTraction.ts +++ b/src/AgentTraction.ts @@ -85,12 +85,14 @@ export class AgentTraction implements AriesAgent { }) } }) + /* .catch(reason => { //TODO: due to a bug, we consider 404 as sucessful presentation if (reason.response.status !== 404){ throw reason } }) + */ } async clearAllRecords() { let records: any[] | undefined = undefined @@ -178,7 +180,7 @@ export class AgentTraction implements AriesAgent { async sendOOBConnectionlessProofRequest(builder: ProofRequestBuilder): Promise { const proofRequest = builder.build() const proof = await this.axios.post(`${this.config.base_url}/present-proof/create-request`,{ - "auto_remove": true, + "auto_remove": false, "auto_verify": true, "comment": "string", "trace": false,