From 3bdb27acab89105e6511a95ec5402a97acc1b415 Mon Sep 17 00:00:00 2001 From: Nathan Seva Date: Wed, 10 Apr 2024 14:30:59 +0200 Subject: [PATCH] Revert "Add fee by default for readonly (#551)" (#554) This reverts commit 8511026ca9118c21f85ab916a0afebe56bacc8d5. --- packages/massa-web3/src/web3/SmartContractsClient.ts | 4 +--- packages/massa-web3/test/web3/smartContractsClient.spec.ts | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/massa-web3/src/web3/SmartContractsClient.ts b/packages/massa-web3/src/web3/SmartContractsClient.ts index 87ed9d24..eb128fed 100644 --- a/packages/massa-web3/src/web3/SmartContractsClient.ts +++ b/packages/massa-web3/src/web3/SmartContractsClient.ts @@ -188,8 +188,6 @@ export class SmartContractsClient ) } - const minimalFees = await this.publicApiClient.getMinimalFees() - const data = { max_gas: readData.maxGas === null || readData.maxGas === undefined @@ -209,7 +207,7 @@ export class SmartContractsClient : undefined, fee: readData.fee ? toMAS(readData.fee).toFixed(MASSA_SCALING_FACTOR) - : toMAS(minimalFees).toFixed(MASSA_SCALING_FACTOR), + : undefined, } // returns operation ids diff --git a/packages/massa-web3/test/web3/smartContractsClient.spec.ts b/packages/massa-web3/test/web3/smartContractsClient.spec.ts index 4e78d383..f6d69d7d 100644 --- a/packages/massa-web3/test/web3/smartContractsClient.spec.ts +++ b/packages/massa-web3/test/web3/smartContractsClient.spec.ts @@ -77,9 +77,6 @@ describe('SmartContractsClient', () => { mockPublicApiClient.getNodeStatus = jest .fn() .mockResolvedValue(mockNodeStatusInfo) - - // Mock the getMinimalFees function - mockPublicApiClient.getMinimalFees = jest.fn().mockResolvedValue(BigInt(0)) // Mock the getBaseAccount function mockWalletClient.getBaseAccount = jest .fn()