diff --git a/.changeset/wicked-waves-cheer.md b/.changeset/wicked-waves-cheer.md new file mode 100644 index 0000000000..1db1bcabc6 --- /dev/null +++ b/.changeset/wicked-waves-cheer.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +**Account Abstraction:** Fixed User Operation fee estimation when a Bundler Client contains custom `estimateFeesPerGas` hook. diff --git a/src/account-abstraction/actions/bundler/prepareUserOperation.ts b/src/account-abstraction/actions/bundler/prepareUserOperation.ts index 9e66c99357..1e27ce957f 100644 --- a/src/account-abstraction/actions/bundler/prepareUserOperation.ts +++ b/src/account-abstraction/actions/bundler/prepareUserOperation.ts @@ -409,7 +409,7 @@ export async function prepareUserOperation< bundlerClient, userOperation: request as UserOperation, }) - request = { + return { ...request, ...fees, }