Skip to content

Commit

Permalink
Do not override the supplied fields with dummy data
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Oct 15, 2024
1 parent 7e72b06 commit 67349f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/sdk/src/PreVerificationGasCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export class PreVerificationGasCalculator {

_fillUserOpWithDummyData (userOp: Partial<UserOperation>): UserOperation {
const filledUserOp: UserOperation = Object.assign({}, userOp) as UserOperation
filledUserOp.preVerificationGas = 21000 // dummy value
filledUserOp.signature = hexlify(Buffer.alloc(this.config.estimationSignatureSize, 0xff))
filledUserOp.paymasterData = hexlify(Buffer.alloc(this.config.estimationPaymasterDataSize, 0xff))
filledUserOp.preVerificationGas = filledUserOp.preVerificationGas ?? 21000
filledUserOp.signature = filledUserOp.signature ?? hexlify(Buffer.alloc(this.config.estimationSignatureSize, 0xff))
filledUserOp.paymasterData = filledUserOp.paymasterData ?? hexlify(Buffer.alloc(this.config.estimationPaymasterDataSize, 0xff))
return filledUserOp
}
}

0 comments on commit 67349f8

Please sign in to comment.