web icon indicating copy to clipboard operation
web copied to clipboard

Gracefully handle 0x quote/api failures

Open MBMaria opened this issue 3 years ago • 1 comments

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:

  1. log into app.shapeshift and connect to wallet of choice
  2. In the trade widget or on the trade page try to enter an amount to trade.
  3. 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

image

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.

MBMaria avatar Oct 06 '22 00:10 MBMaria

Thanks for getting this posted @MBMaria

Neverwas-dev avatar Oct 06 '22 13:10 Neverwas-dev

@MBMaria plz reopen if still valid, swapper seems v happy lately

0xdef1cafe avatar Feb 05 '23 23:02 0xdef1cafe