Skip to content

Commit

Permalink
Remove unnecessary wait(), change tag in test
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-ap committed Apr 3, 2024
1 parent 8e07831 commit 87b4fea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { buildSignatureBytes } from '@safe-global/safe-4337/src/utils/execution'
* Step 2: Create a userOp, sign it with Passkey signer.
* Step 3: Execute the userOp that deploys a safe with passkey signer as owner.
*/
describe('Create a Safe with Passkey signer as owner: [@User story]', () => {
describe('Create a Safe with Passkey signer as owner: [@userstory]', () => {
// Create a fixture to setup the contracts and signer(s)
const setupTests = deployments.createFixture(async ({ deployments }) => {
const { EntryPoint, Safe4337Module, SafeProxyFactory, SafeModuleSetup, SafeL2, FCLP256Verifier, WebAuthnSignerFactory } =
Expand Down Expand Up @@ -148,12 +148,12 @@ describe('Create a Safe with Passkey signer as owner: [@User story]', () => {
packedUserOp.signature = ethers.solidityPacked(['uint48', 'uint48', 'bytes'], [safeOp.validAfter, safeOp.validUntil, signature])

// Send 1 ETH to the Safe
await user.sendTransaction({ to: safe, value: ethers.parseEther('1') }).then((tx) => tx.wait())
await user.sendTransaction({ to: safe, value: ethers.parseEther('1') })
// Check if Safe is not already created
expect(await ethers.provider.getCode(safe)).to.equal('0x')

// Step 3: Execute the userOp that deploys a safe with passkey signer as owner.
await (await entryPoint.handleOps([packedUserOp], user.address)).wait()
await entryPoint.handleOps([packedUserOp], user.address)

// Check if Safe is created and uses the expected Singleton
const [implementation] = ethers.AbiCoder.defaultAbiCoder().decode(['address'], await ethers.provider.getStorage(safe, 0))
Expand Down

0 comments on commit 87b4fea

Please sign in to comment.