From 977ab7ac614245378d543c93d19f8b00974ec417 Mon Sep 17 00:00:00 2001 From: ppedziwiatr Date: Thu, 15 Jun 2023 10:53:43 +0200 Subject: [PATCH] v1.4.12 --- package.json | 2 +- src/__tests__/unit/evaluation-options.test.ts | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 062a084e..b0178727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "warp-contracts", - "version": "1.4.11", + "version": "1.4.12", "description": "An implementation of the SmartWeave smart contract protocol.", "types": "./lib/types/index.d.ts", "main": "./lib/cjs/index.js", diff --git a/src/__tests__/unit/evaluation-options.test.ts b/src/__tests__/unit/evaluation-options.test.ts index ed35c5a2..d882477c 100644 --- a/src/__tests__/unit/evaluation-options.test.ts +++ b/src/__tests__/unit/evaluation-options.test.ts @@ -102,9 +102,11 @@ describe('Evaluation options evaluator', () => { walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/' }); - expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { + expect( + new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { internalWrites: false - }).rootOptions).toEqual({ + }).rootOptions + ).toEqual({ allowBigInt: false, cacheEveryNInteractions: -1, gasLimit: 2222, @@ -129,9 +131,11 @@ describe('Evaluation options evaluator', () => { walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/' }); - expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { - unsafeClient: 'throw' - }).rootOptions).toEqual({ + expect( + new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { + unsafeClient: 'throw' + }).rootOptions + ).toEqual({ allowBigInt: false, cacheEveryNInteractions: -1, gasLimit: 2222, @@ -156,9 +160,11 @@ describe('Evaluation options evaluator', () => { walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/' }); - expect(new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { - unsafeClient: 'skip' - }).rootOptions).toEqual({ + expect( + new EvaluationOptionsEvaluator(contract2.evaluationOptions(), { + unsafeClient: 'skip' + }).rootOptions + ).toEqual({ allowBigInt: false, cacheEveryNInteractions: -1, gasLimit: 2222, @@ -183,7 +189,6 @@ describe('Evaluation options evaluator', () => { walletBalanceUrl: 'http://nyc-1.dev.arweave.net:1984/' }); - const contract3 = warp.contract(null).setEvaluationOptions({ internalWrites: false, unsafeClient: 'throw', @@ -210,7 +215,6 @@ describe('Evaluation options evaluator', () => { }).toThrow('Cannot proceed with contract evaluation.'); }); - it('should properly set foreign evaluation options - unsafeClient - allow', async () => { const contract = warp.contract(null).setEvaluationOptions({ unsafeClient: 'allow'