Skip to content

Commit

Permalink
Merge pull request #128 from gnosisguild/connect-issue
Browse files Browse the repository at this point in the history
Fix connect issue & simulation block timestamp
  • Loading branch information
jfschwarz authored Aug 1, 2024
2 parents d868789 + a173c50 commit d64617a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions extension/src/providers/ForkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,13 @@ class ForkProvider extends EventEmitter {
const checkpointId: string = await this.provider.request({
method: 'evm_snapshot',
})
this.handlers.onBeforeTransactionSend(checkpointId, metaTx)
console.log({
mod: this.moduleAddress,
ava: this.avatarAddress,
own: this.ownerAddress,
await this.provider.request({
method: 'evm_setNextBlockTimestamp',
params: [Math.ceil(Date.now() / 1000).toString()],
})

this.handlers.onBeforeTransactionSend(checkpointId, metaTx)

// correctly route the meta tx through the avatar
let tx: TransactionData & TransactionOptions
if (this.moduleAddress) {
Expand Down
4 changes: 3 additions & 1 deletion extension/src/routes/RoutesDrawer/ConnectButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
asLegacyConnection,
fromLegacyConnection,
} from '../../legacyConnectionMigrations'
import { ZeroAddress } from 'ethers'

const walletConnectLogo = (
<img src={PUBLIC_PATH + walletConnectLogoUrl} alt="wallet connect logo" />
Expand All @@ -34,8 +35,9 @@ const metamaskLogo = (
const ConnectButton: React.FC<{ id: string }> = ({ id }) => {
const [routes, setRoutes] = useRoutes()
const { connected, route, chainId } = useRoute(id)
const pilotAddress =
let pilotAddress =
route.initiator && parsePrefixedAddress(route.initiator)[1].toLowerCase()
if (pilotAddress === ZeroAddress) pilotAddress = ''

const metamask = useMetaMask()
const walletConnect = useWalletConnect(route.id)
Expand Down

0 comments on commit d64617a

Please sign in to comment.