Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 0 is falsey 🤦‍♂️ #4177

Merged
merged 5 commits into from
Apr 3, 2023
Merged

Conversation

0xApotheosis
Copy link
Contributor

@0xApotheosis 0xApotheosis commented Apr 3, 2023

Description

Fixes a bug where hasNegativeRatio would be false if inputOutputRatio was 0.

Relates to a lib fix: shapeshift/lib#1230, however it's not a dependancy and this PR can go in without it.

Notice

  • Have you followed the guidelines in our Contributing guide?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

N/A

Risk

Very small.

Testing

Couple with an incoming lib PR. TODO.

Engineering

Operations

Screenshots (if applicable)

N/A

@0xApotheosis
Copy link
Contributor Author

0xApotheosis commented Apr 3, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@0xApotheosis 0xApotheosis mentioned this pull request Apr 3, 2023
5 tasks
@0xApotheosis 0xApotheosis changed the title fix: 0 is truthy 🤦‍♂️ fix: 0 is falsey 🤦‍♂️ Apr 3, 2023
@0xApotheosis 0xApotheosis marked this pull request as ready for review April 3, 2023 06:09
@0xApotheosis 0xApotheosis requested a review from a team as a code owner April 3, 2023 06:09
@0xApotheosis 0xApotheosis mentioned this pull request Apr 3, 2023
5 tasks
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See review from shapeshift/lib#1230, pre-stamp, will stamp this as soon as the lib PR gets in

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sanity retested this after bumping the swapper dep, confirmed I wasn't able to see negative amounts for CoW (and miner fees are properly displayed for ZRX/Thor)

@gomesalexandre gomesalexandre enabled auto-merge (squash) April 3, 2023 09:38
@gomesalexandre gomesalexandre merged commit 822d884 into develop Apr 3, 2023
@gomesalexandre gomesalexandre deleted the 04-03-fix_0_is_truthy_ branch April 3, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants