diff --git a/src/celo/fees.test.ts b/src/celo/fees.test.ts index 2a4f8b0b5e..efab97af64 100644 --- a/src/celo/fees.test.ts +++ b/src/celo/fees.test.ts @@ -45,9 +45,11 @@ describe('celo/fees', () => { }, } as any) + // The fees maxFeePerGas is calculated as (baseFee * multiplier) + maxPriorityFeePerGas + // Which is ((15057755162-602286) * 150 / 100) + 602286 = 22586331600 expect(fees).toMatchInlineSnapshot(` { - "maxFeePerGas": 22587235029n, + "maxFeePerGas": 22586331600n, "maxPriorityFeePerGas": 602286n, } `) diff --git a/src/celo/fees.ts b/src/celo/fees.ts index e6334247c4..591c31a8dd 100644 --- a/src/celo/fees.ts +++ b/src/celo/fees.ts @@ -30,11 +30,10 @@ export const fees: ChainFees = { ), ]) - const suggestedMaxFeePerGas = - params.multiply(maxFeePerGas) + maxPriorityFeePerGas + const adjustedBasFee = params.multiply(maxFeePerGas-maxPriorityFeePerGas) return { - maxFeePerGas: suggestedMaxFeePerGas, + maxFeePerGas: adjustedBasFee + maxPriorityFeePerGas, maxPriorityFeePerGas, } },