velocitylabs-org / turtle

https://app.turtle.cool
MIT License
3 stars 2 forks source link

Fix: prevents swap when transfer is ongoing #117

Closed Victor-Salomon closed 2 months ago

Victor-Salomon commented 2 months ago

This PR prevent chains swap when a transfer is ongoing and updates CSS accordingly.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
turtle-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 11:09am
turtle-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 11:09am
Victor-Salomon commented 2 months ago

I already included the check within the allowSwap, and the handleSwap. The fact is, the swap can be disabled because the chain swap is not allowed (which relies on the allowSwap) or because of an ongoing transfer (which relies on the status itself). I will check again if I can improve.

Victor-Salomon commented 2 months ago

@noahjoeris I can't bypass the cursor modification without taking into consideration an ongoing transfer (which differs from the 'disabled status'). When the component is disabled because of an ongoing transfer, the cursor changes from default to not allowed on hover which is wired.

Either we:

I would go for option 2

noahjoeris commented 2 months ago

@Victor-Salomon Alright thanks. You can decide. I'd also go with option 2 or 3