diff --git a/src/gas-price/gas-price.test.ts b/src/gas-price/gas-price.test.ts index 95afc8ac..94c46237 100644 --- a/src/gas-price/gas-price.test.ts +++ b/src/gas-price/gas-price.test.ts @@ -160,6 +160,7 @@ describe(getRecommendedGasPrice.name, () => { expect(logger.warn).toHaveBeenCalledTimes(1); expect(logger.warn).toHaveBeenNthCalledWith(1, 'Sanitizing gas price.', { gasPrice: '120000000000', + ratio: '6.98', sanitizationGasPriceCap: '17200000000', }); }); @@ -298,6 +299,7 @@ describe(getRecommendedGasPrice.name, () => { }); expect(logger.warn).toHaveBeenNthCalledWith(2, 'Sanitizing gas price.', { gasPrice: '20900000000', + ratio: '1.08', sanitizationGasPriceCap: '19400000000', }); }); diff --git a/src/gas-price/gas-price.ts b/src/gas-price/gas-price.ts index 40257a3a..726ccf2a 100644 --- a/src/gas-price/gas-price.ts +++ b/src/gas-price/gas-price.ts @@ -151,7 +151,7 @@ export const getRecommendedGasPrice = (chainId: string, providerName: string, sp logger.warn('Sanitizing gas price.', { gasPrice: gasPriceToUse.toString(), sanitizationGasPriceCap: sanitizationGasPriceCap.toString(), - percentage: (Number(gasPriceToUse) / Number(sanitizationGasPriceCap)).toFixed(2), + ratio: (Number(gasPriceToUse) / Number(sanitizationGasPriceCap)).toFixed(2), }); return sanitizationGasPriceCap; } diff --git a/src/update-feeds-loops/submit-transactions.test.ts b/src/update-feeds-loops/submit-transactions.test.ts index 5550ae40..b868eaa4 100644 --- a/src/update-feeds-loops/submit-transactions.test.ts +++ b/src/update-feeds-loops/submit-transactions.test.ts @@ -392,6 +392,7 @@ describe(submitTransactionsModule.submitTransaction.name, () => { jest.spyOn(gasPriceModule, 'getRecommendedGasPrice').mockReturnValue(BigInt(100_000_000)); jest.spyOn(updatabilityTimestampModule, 'isAlreadyUpdatable').mockReturnValue(false); const api3ServerV1 = generateMockApi3ServerV1(); + jest.spyOn(api3ServerV1.tryMulticall, 'send').mockReturnValue({ hash: '0xTransactionHash' }); jest.spyOn(api3ServerV1, 'connect').mockReturnValue(api3ServerV1); jest.spyOn(stateModule, 'getState').mockReturnValue( allowPartial({ @@ -434,7 +435,9 @@ describe(submitTransactionsModule.submitTransaction.name, () => { nonce: 0, sponsorWalletAddress: '0xA772F7b103BBecA3Bb6C74Be41fCc2c192C8146c', }); - expect(logger.info).toHaveBeenNthCalledWith(2, 'Successfully submitted the multicall transaction.'); + expect(logger.info).toHaveBeenNthCalledWith(2, 'Successfully submitted the multicall transaction.', { + txHash: '0xTransactionHash', + }); // Verify the flow of the update process via the debug logs. Note, that some debug log calls are not here because // many functions are mocked.