Skip to content

Cannot read property 'getCode' of null #1740

Answered by zemse
Venoox asked this question in Q&A
Discussion options

You must be logged in to vote

Can you try changing const signer = provider.getSigner(); to const signer = await provider.getSigner(); if that fixes?

edit: when you're setProvider(provider); setSigner(signer);, maybe it's not setting the value for signer before initializeData is called. Can you try adding await before them?

await setProvider(provider);
await setSigner(signer);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ricmoo
Comment options

@Venoox
Comment options

Answer selected by Venoox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants