pendulum-chain / portal

The Pendulum/Amplitude portal UI
GNU General Public License v3.0
1 stars 1 forks source link

Approve button does not appear again for new swap after successful swap #467

Open prayagd opened 1 month ago

prayagd commented 1 month ago

Describe the bug

When a user completes a Nabla swap and now changes the source token and does not change the source amount, the Approve button does not show up and directly a Swap button is displayed on clicking Swap button the transaction fails.

Reproduction

Steps to reproduce the behavior:

  1. Go to https://portal.pendulumchain.org/foucoco/nabla/swap
  2. Select any source token and destination token and do a swap
  3. Now change the source token and dont change the amount, the UI shows a swap button
  4. On clicking the Swap button, the UI throws and error

Expected behavior

Approve button should show before every new swap to be done assuming the Approval was not done for the specific pair and amount

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Add any other context about the problem here.