Skip to content

Commit

Permalink
Merge pull request #129 from gnosisguild/fix-simulation-issues
Browse files Browse the repository at this point in the history
Fix simulation issues
  • Loading branch information
jfschwarz authored Aug 13, 2024
2 parents d64617a + 1a97de7 commit f847d80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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,
})
}
7 changes: 1 addition & 6 deletions extension/src/providers/ProvideTenderly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,7 @@ export class TenderlyProvider extends EventEmitter {
display_name: 'Zodiac Pilot Test Flight',
fork_config: {
network_id: networkId,
block_number:
blockNumber ||
(await getReadOnlyProvider(this.chainId as ChainId).send(
'eth_blockNumber',
[]
)),
block_number: blockNumber,
},
virtual_network_config: {
base_fee_per_gas: 0,
Expand Down

0 comments on commit f847d80

Please sign in to comment.