Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/relay-kit/src/packs/safe-4337/Safe4337Pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export class Safe4337Pack extends RelayKitBasePack<{
bundlerUrl,
customContracts,
paymasterOptions,
onchainAnalytics
onchainAnalytics,
contractNetworks
} = initOptions

let protocolKit: Safe
Expand Down Expand Up @@ -262,7 +263,12 @@ export class Safe4337Pack extends RelayKitBasePack<{
setupTransactions.push(approveToPaymasterTransaction)
}

const safeProvider = await SafeProvider.init({ provider, signer, safeVersion })
const safeProvider = await SafeProvider.init({
provider,
signer,
safeVersion,
contractNetworks
})

// third transaction: passkey support via shared signer SafeWebAuthnSharedSigner
// see: https://github.com/safe-global/safe-modules/blob/main/modules/passkey/contracts/4337/experimental/README.md
Expand Down
4 changes: 3 additions & 1 deletion packages/relay-kit/src/packs/safe-4337/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Account, Address, Chain, Hash, Hex, PublicClient, PublicRpcSchema, Tran
import Safe, {
DeploymentType,
SafeProviderConfig,
OnchainAnalyticsProps
OnchainAnalyticsProps,
ContractNetworksConfig
} from '@safe-global/protocol-kit'
import {
EstimateGasData,
Expand Down Expand Up @@ -57,6 +58,7 @@ export type Safe4337InitOptions = {
options: ExistingSafeOptions | PredictedSafeOptions
paymasterOptions?: PaymasterOptions
onchainAnalytics?: OnchainAnalyticsProps
contractNetworks?: ContractNetworksConfig
}

export type Safe4337Options = {
Expand Down