PatrickAlphaC / defi-stake-yield-brownie-freecode

53 stars 63 forks source link

Not able to retrieve token balance #21

Closed karthikr87 closed 2 years ago

karthikr87 commented 2 years ago

The application is connected to the metamask wallet that is connected to the Kovan test network. I am able to get all three token addresses but am not able to get the balances of them using the useTokenBalance method. Even I cross-checked with your code on GitHub. Not finding any issues at all. Not Sure What I am doing wrong. Error msg: undefined.

karthikr87 commented 2 years ago

version mismatch. Installed 0.7 of usedapp fixed the problem

achimstruve commented 2 years ago

version mismatch. Installed 0.7 of usedapp fixed the problem

How do I install another usedapp version? I used the command yarn add @usedapp/core to install it before. I ask, because I have the same problem as you rn.

achimstruve commented 2 years ago

version mismatch. Installed 0.7 of usedapp fixed the problem

How do I install another usedapp version? I used the command yarn add @usedapp/core to install it before. I ask, because I have the same problem as you rn.

Solved! This approach of @PatrickAlphaC worked for me: https://github.com/PatrickAlphaC/defi-stake-yield-brownie-freecode/issues/6#issuecomment-999183398

huaihsuanbusiness commented 2 years ago

@achimstruve Same issue here, I cannot find and figure out the meaning of the third step a line called "package.lock" that Patrick mentioned, do you know where it is?

achimstruve commented 2 years ago

@achimstruve Same issue here, I cannot find and figure out the meaning of the third step a line called "package.lock" that Patrick mentioned, do you know where it is?

It is meant to be the package.json file in your front_end folder. Go into the file and change following line: "@usedapp/core": "0.4.2",