Skip to content

Commit

Permalink
fix type/await
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Dec 2, 2024
1 parent d3d3080 commit a6e3659
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { useState } from 'react'
import useSWR from 'swr'
import { encodeFunctionData, formatEther } from 'viem'

const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));


import SWR_KEYS from 'src/constants/swrKeys'
import { ProposalsResponse } from 'src/data/subgraph/requests/proposalsQuery'
import { getProposals } from 'src/data/subgraph/requests/proposalsQuery'
Expand Down Expand Up @@ -110,10 +113,7 @@ export const Escrow: React.FC = () => {
}

// add 1s delay here
await new Promise(resolve => setTimeout(() => {
console.log('Wait for Ipfs upload');
resolve();
}, 1000));
await wait(1000);

// create bundler transaction data
const escrowData = createEscrowData(values, ipfsCID, chainId)
Expand Down

0 comments on commit a6e3659

Please sign in to comment.