From 390489cd06426ef26581ed13cf7acbb2673f6fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yathish=2E=CE=9E?= <123yathish.r@gmail.com> Date: Tue, 15 Mar 2022 12:07:06 +0530 Subject: [PATCH] fixes minor issues (#57) --- package.json | 2 +- src/SafientCore.ts | 4 ++-- test/scenario5.js | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8c4dd86..a341c2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@safient/core", - "version": "0.1.12-alpha", + "version": "0.1.13-alpha", "description": "JavaScript SDK to manage safes and interact with Safient protocol.", "keywords": [ "Web3", diff --git a/src/SafientCore.ts b/src/SafientCore.ts index 0cf597f..af75aba 100644 --- a/src/SafientCore.ts +++ b/src/SafientCore.ts @@ -493,7 +493,7 @@ export class SafientCore { result.claims[result.claims.length - 1].claimStatus = claimStatus if(claimStatus === ClaimStages.PASSED){ result.stage = SafeStages.RECOVERING - }else{ + }else if(claimStatus === ClaimStages.FAILED || claimStatus === ClaimStages.REJECTED){ result.stage = SafeStages.ACTIVE } } @@ -597,8 +597,8 @@ export class SafientCore { } if (createSafetxReceipt.status === 1) { - evidenceUri = await createClaimEvidenceUri(file, evidenceName, description); if (safe.claimType === Types.ClaimType.ArbitrationBased) { + evidenceUri = await createClaimEvidenceUri(file, evidenceName, description); tx = await this.contract.createClaim(safe._id, evidenceUri); } else { tx = await this.contract.createClaim(safe._id, ''); diff --git a/test/scenario5.js b/test/scenario5.js index 5a81f81..54d2ce7 100644 --- a/test/scenario5.js +++ b/test/scenario5.js @@ -221,7 +221,6 @@ describe('Scenario 5 - Creating signal based Safe', async () => { it('Should send signal after claim', async () => { const result = await creatorSc.createSignal(safeId); - console.log(result)//Passing a claim expect(result.data.status).to.equal(1); });