Skip to content

Commit

Permalink
fix: Use chain-specific addresses for safe creation
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Oct 2, 2024
1 parent c8f5406 commit 035a761
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/new-safe/create/logic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ export const createNewUndeployedSafeWithoutSalt = (
})
const fallbackHandlerAddress = fallbackHandlerDeployment?.defaultAddress
const safeL2Deployment = getSafeL2SingletonDeployment({ version: safeVersion, network: chain.chainId })
const safeL2Address = safeL2Deployment?.defaultAddress
const safeL2Address = safeL2Deployment?.networkAddresses[chain.chainId]

const safeL1Deployment = getSafeSingletonDeployment({ version: safeVersion, network: chain.chainId })
const safeL1Address = safeL1Deployment?.defaultAddress
const safeL1Address = safeL1Deployment?.networkAddresses[chain.chainId]

const safeFactoryDeployment = getProxyFactoryDeployment({ version: safeVersion, network: chain.chainId })
const safeFactoryAddress = safeFactoryDeployment?.defaultAddress
const safeFactoryAddress = safeFactoryDeployment?.networkAddresses[chain.chainId]

if (!safeL2Address || !safeL1Address || !safeFactoryAddress || !fallbackHandlerAddress) {
throw new Error('No Safe deployment found')
Expand Down

0 comments on commit 035a761

Please sign in to comment.