Skip to content

Commit

Permalink
nullable authorizationList
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Dec 12, 2024
1 parent af7d3d3 commit 9a5bc12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/bundler/src/modules/BundleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export class BundleManager implements IBundleManager {
}
mergeStorageMap(storageMap, validationResult.storageMap)

for (const eip7702Authorization of entry.userOp.authorizationList) {
for (const eip7702Authorization of entry.userOp.authorizationList ?? []) {
const existingAuthorization = sharedAuthorizationList
.find(it => {
return getEip7702AuthorizationSigner(it) === getEip7702AuthorizationSigner(eip7702Authorization)
Expand All @@ -420,7 +420,7 @@ export class BundleManager implements IBundleManager {
// eslint-disable-next-line no-labels
continue mainLoop
}
if (existingAuthorization == null) {
if (existingAuthorization == null && entry.userOp.authorizationList != null) {
sharedAuthorizationList.push(...entry.userOp.authorizationList)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/interfaces/OperationBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export interface OperationBase {
verificationGasLimit: BigNumberish
paymasterVerificationGasLimit?: BigNumberish
paymasterPostOpGasLimit?: BigNumberish
authorizationList: EIP7702Authorization[]
authorizationList?: EIP7702Authorization[]
}
2 changes: 1 addition & 1 deletion packages/validation-manager/src/ValidationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class ValidationManager implements IValidationManager {
addresses: [],
hash: ''
}
const stateOverrideForEip7702 = await this.getAuthorizationsStateOverride(userOp.authorizationList)
const stateOverrideForEip7702 = await this.getAuthorizationsStateOverride(userOp.authorizationList ?? [])
let storageMap: StorageMap = {}
if (!this.unsafe) {
let tracerResult: BundlerTracerResult
Expand Down

0 comments on commit 9a5bc12

Please sign in to comment.