Closed Brijesh-Adeshara closed 1 year ago
any idea how to resolve this
@Brijesh-Adeshara Is there any error logged on console upon createCampaign
trigger ?
Provide error log if any, to understand the issue better.
@A-Pradeep yes i attached one photo of the error
@Brijesh-Adeshara seems connect
is not working,
can you check with this following code.
https://github.com/adrianhajdin/project_crowdfunding/blob/a554d7eaeefe1f6f2b73c8ecd837b6805aaed4b7/client/src/context/index.jsx#L14
@A-Pradeep Brother i add one line from this line
import { EditionMetadataWithOwnerOutputSchema } from '@thirdweb-dev/sdk';
but still shows the same error
attached photo
@Brijesh-Adeshara Not sure why it's used for, but on YouTube I've not come across. Even added on my local project and not faced any issue. Can you remove that line and try once ?
@A-Pradeep yes tried it with and without that line but same error occured but if i try to create campaign from thirdweb dashboard then it is successfully completed like, from thirdweb dashboard the notification of gas fees is popped up from metamask and i able to add a campaign successfully but from front end it shows this error..
@Brijesh-Adeshara From Thirdweb it will work. Seems like your react app not able to trigger the MetaMask.
npm i @thirdweb-dev/react @thirdweb-dev/sdk ethers@^5
main.tsx
so that the ThirdwebProvider
is at parent level.For reference
<ThirdwebProvider activeChain={ChainId.Goerli}>
<Router>
<StateContextProvider>
<App />
</StateContextProvider>
</Router>
</ThirdwebProvider>
CreateCampaign
button logic is linked. Once connect()
is true the button will show else, connect button will show.@Brijesh-Adeshara It may sound stupid, but make sure the MetaMask extension is added on the Browser and you are using the Goerli test network
@A-Pradeep yes brother metamask extension is added and i am using goerli test network
@A-Pradeep can you plz provide your CreateCampaign.jsx file ??
@Brijesh-Adeshara Hope this helps https://gist.github.com/A-Pradeep/10fdc71b7c55db33095b7ad871ddc492
@A-Pradeep ok thanks..
i have tried so many times but i wonder why this happen