From e7ed2bdd6ec183801c83b5cd74be48cbbfaf9fbb Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 3 Oct 2023 15:39:30 +0100 Subject: [PATCH] maybe fix zero base fee --- src/actions/public/estimateMaxPriorityFeePerGas.test.ts | 2 +- src/actions/public/estimateMaxPriorityFeePerGas.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/public/estimateMaxPriorityFeePerGas.test.ts b/src/actions/public/estimateMaxPriorityFeePerGas.test.ts index 90da52130d6..e9f7d84d125 100644 --- a/src/actions/public/estimateMaxPriorityFeePerGas.test.ts +++ b/src/actions/public/estimateMaxPriorityFeePerGas.test.ts @@ -154,7 +154,7 @@ test('client: chain `defaultPriorityFee` override', async () => { transport: http(), }) expect(await estimateMaxPriorityFeePerGas(client_4)).toBe(0n) - + // async zero base fee const client_5 = createPublicClient({ chain: { diff --git a/src/actions/public/estimateMaxPriorityFeePerGas.ts b/src/actions/public/estimateMaxPriorityFeePerGas.ts index 553b77f3725..e7f4e90d60c 100644 --- a/src/actions/public/estimateMaxPriorityFeePerGas.ts +++ b/src/actions/public/estimateMaxPriorityFeePerGas.ts @@ -88,7 +88,7 @@ export async function internal_estimateMaxPriorityFeePerGas< client, request, } as ChainFeesFnParameters) - } else if (chain?.fees?.defaultPriorityFee) + } else if (typeof chain?.fees?.defaultPriorityFee !== 'undefined') return chain?.fees?.defaultPriorityFee try {