Skip to content

Commit

Permalink
fix: permissions module installation (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
KannuSingh committed Aug 7, 2024
1 parent 4ba8456 commit 29b5342
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ import {
import { SmartAccountLib } from './SmartAccountLib'
import { SmartAccount, signerToSafeSmartAccount } from 'permissionless/accounts'
import { EntryPoint } from 'permissionless/types/entrypoint'
import { Address, Hex, WalletGrantPermissionsParameters, createWalletClient, http,type WalletGrantPermissionsReturnType } from 'viem'
import {
Address,
Hex,
WalletGrantPermissionsParameters,
createWalletClient,
http,
type WalletGrantPermissionsReturnType
} from 'viem'
import { MultiKeySigner } from 'viem/_types/experimental/erc7715/types/signer'
import { bigIntReplacer } from '@/utils/HelperUtil'
import {
Expand Down Expand Up @@ -94,7 +101,9 @@ export class SafeSmartAccountLib extends SmartAccountLib {
}

/* 7715 method */
async grantPermissions(grantPermissionsRequestParameters: WalletGrantPermissionsParameters):Promise<WalletGrantPermissionsReturnType> {
async grantPermissions(
grantPermissionsRequestParameters: WalletGrantPermissionsParameters
): Promise<WalletGrantPermissionsReturnType> {
if (!this.client?.account) {
throw new Error('Client not initialized')
}
Expand Down Expand Up @@ -173,7 +182,7 @@ export class SafeSmartAccountLib extends SmartAccountLib {
})
}

if (isAccountDeployed && !mockValidatorInstalled) {
if (!isAccountDeployed || !mockValidatorInstalled) {
installModules.push({
address: mockValidator,
type: 'validator',
Expand Down

0 comments on commit 29b5342

Please sign in to comment.