web
web copied to clipboard
Gracefully handle 0x quote/api failures
Overview
If/when the 0x quotes/api fails, the trade swapper doesn't allow numbers to be entered into the widget or the trade page. Makes it appear the site is in a broken state.
References and additional details
*If 0x api has failed:
- log into app.shapeshift and connect to wallet of choice
- In the trade widget or on the trade page try to enter an amount to trade.
- Notice that no numbers can be entered and an error in the console appears.
https://api.0x.org/swap/v1/price?buyToken=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&buyAmount=1000000000&sellToken=ETH

Acceptance Criteria
If/when 0x api fails, it should be handles gracefully - either an error message or trade reverted to a different protocol.
Need By Date
No response
Screenshots/Mockups
No response
Ownership
- [X] If my bounty needs engineering or needs product I have added the respective labels on the right
- [X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)
Estimated effort
No response
Sponsor / Stakeholder
No response
Bounty Hunters
- Join our discord
- Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
- Please refer to this link for some basic info
- Please do not start work on this issue until you are approved in Gitcoin.
Thanks for getting this posted @MBMaria
@MBMaria plz reopen if still valid, swapper seems v happy lately