PatrickAlphaC / defi-stake-yield-brownie-freecode

52 stars 62 forks source link

Second transaction does not appear after approve? #7

Open skimaharvey opened 2 years ago

skimaharvey commented 2 years ago

Hello,

For some reason the 2nd metasmask transaction does not appear after being approved? Any idea where this could be coming from? I do have the notification coming "ERC-20 token transfer approved! Now approve the 2nd transaction." Also I am having the already reported issues but i dont think that is related :

Thank you for your help.

PatrickAlphaC commented 2 years ago

I think you're right... I think this repo needs a UI update

amanmehra262001 commented 2 years ago

Yes its same with me have got any solutions for the same @skimaharvey @PatrickAlphaC Thanks in advance

amanmehra262001 commented 2 years ago

BTW thnq @PatrickAlphaC for amazing free course also where can i find your more courses

PatrickAlphaC commented 2 years ago

https://www.youtube.com/c/PatrickCollins/about

I also have medium articles, chainlink blog articles, twitter, I'm all over the place.

Glad you liked them!

amanmehra262001 commented 2 years ago

for any one who came up with same issue let me tell you problem is not in the code you wrote , although I still cant point out the main issue but I'd run my own dirty tricks and can assure that its not in your written code I exchanged my src with Patricks src and DAPP worked fine so that assures me its not my code that is creating problem what you can try to overcome the issue is recreate react-app and move your whole code accordingly

ikhide commented 2 years ago

For me, I had a similar issue with Fau and Eth tokens. I realized I had a bug on the tokenIsAllowed function causing a return of false for both. My function was:

function tokenIsAllowed(address _token) public returns(bool){
        for (uint256 tokenIndex=0; tokenIndex<allowedTokens.length; tokenIndex++){
            if(allowedTokens[tokenIndex]==_token){
                return true;
            } else {
                return false;
            }
        }
    }

instead of:

function tokenIsAllowed(address _token) public returns(bool){
        for (uint256 tokenIndex=0; tokenIndex<allowedTokens.length; tokenIndex++){
            if(allowedTokens[tokenIndex] == _token){
                return true;
            }
        }
        return false;
    }