Skip to content

Commit

Permalink
fix simulation through owner accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Aug 13, 2024
1 parent a7a7f23 commit 1a97de7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extension/src/integrations/safe/kits.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Safe from '@safe-global/protocol-kit'
import SafeApiKit from '@safe-global/api-kit'
import { ChainId } from 'ser-kit'
import { getEip1193ReadOnlyProvider } from '../../providers/readOnlyProvider'
import { RPC } from '../../chains'

export const TX_SERVICE_URL: Record<ChainId, string | undefined> = {
[1]: 'https://safe-transaction-mainnet.safe.global/api',
Expand Down Expand Up @@ -32,7 +32,8 @@ export const initSafeProtocolKit = async (
safeAddress: string
) => {
return await Safe.init({
provider: getEip1193ReadOnlyProvider(chainId),
// we must pass the RPC endpoint as a string. If we pass an EIP1193 provider, Safe will send eth_requestAccounts calls (which will fail)
provider: RPC[chainId],
safeAddress,
})
}

0 comments on commit 1a97de7

Please sign in to comment.