yearn / yearn.fi

https://yearn.fi
GNU General Public License v3.0
22 stars 48 forks source link

Bug: Allowance is not queried for current selected from token #132

Closed jainkunal closed 1 year ago

jainkunal commented 1 year ago

What happened 🆘

In case on Zaps when the from token is selected from the dropdown, allowance is not queried for the current selected token but for the token that was previously selected.

To Reproduce 🔂

Steps to reproduce the behavior:

  1. Go to https://yearn.finance/vaults/1/0x8078198Fc424986ae89Ce4a910Fc109587b6aBF3 and connect your wallet
  2. In the From Wallet dropdown select a non-ETH and non-crv3crypto token
  3. Allowance queried in the above case is for the newly selected token
  4. Open Network tab in debug console
  5. Select ETH in From wallet dropdown, allowance is queried for the token selected in Step 2 and not for ETH.

At this time, Step 5 can be repeated with any other token and allowance is queried only for previously selected token.

karelianpie commented 1 year ago

Closing as the fix https://github.com/yearn/yearn.fi/pull/133 was merged