Skip to content

Commit

Permalink
Revert "Add fee by default for readonly (#551)" (#554)
Browse files Browse the repository at this point in the history
This reverts commit 8511026.
  • Loading branch information
Thykof authored Apr 10, 2024
1 parent 7e5b2e1 commit 3bdb27a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions packages/massa-web3/src/web3/SmartContractsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ export class SmartContractsClient
)
}

const minimalFees = await this.publicApiClient.getMinimalFees()

const data = {
max_gas:
readData.maxGas === null || readData.maxGas === undefined
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions packages/massa-web3/test/web3/smartContractsClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3bdb27a

Please sign in to comment.