Closed AnneCh closed 2 years ago
What happens when you:
rm -r node_modules
rm yarn.lock
package.json
to be:
{
"dependencies": {
"@usedapp/core": "0.4.2"
}
}
yarn
And then try it?
I see where my mistake was, I had two package.json
, and only had modified one.
Now the network name and chainId show!
But I'm still having error messages on my Main.tsx. I've moved forward with creating the Wallet and displaying it on Main.tsx, and the same error message shows on brownieConfig["networks"][networkName]["weth_token] : constants.AddressZero
:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ development: { verify: boolean; }; rinkeby: { link_token: string; eth_usd_price_feed: string; dai_usd_price_feed: string; verify: boolean; }; kovan: { weth_token: string; fau_token: string; eth_usd_price_feed: string; dai_usd_price_feed: string; verify: boolean; }; }'.ts(7053)
for now it doesn't look like it's stopping anything from happening though... Should I just discard those warnings and move forward?
I've moved forward with the project and this error was replaced with another one that I'm currently working on fixing, so I'll close this issue
I had the same issue and this solved it, thanks!
Hi,
I'm working on the Main.tsx document, and I'm getting this error for both helperConfig and networkMapping :
for helperConfig:
Element implicitly has an 'any' type because expression of type 'ChainId' can't be used to index type '{ "42": string; "4": string; "1337": string; "1": string; }'. Property '[ChainId.Ropsten]' does not exist on type '{ "42": string; "4": string; "1337": string; "1": string; }'.ts(7053)
for networkMapping:
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ "42": { DappToken: string[]; TokenFarm: string[]; }; }'. No index signature with a parameter of type 'string' was found on type '{ "42": { DappToken: string[]; TokenFarm: string[]; }; }'.ts(7053)
Here is my Main.tsx:
On top of that, when printing console.log(networkName) and console.log(chainId), I get this error message :
supportedChain is deprecated, please pass networks instead
For which I've tried the solutions proposed on this issue, unsuccessfully.Any help greatly appreciated :)