• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gnosis / dex-services / 5103
31%

Build:
DEFAULT BRANCH: master
Ran 08 Sep 2020 11:11AM UTC
Jobs 1
Files 99
Run time 21min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Sep 2020 10:59AM UTC coverage: 28.042% (+0.04%) from 28.003%
5103

push

travis-pro

web-flow
consistent dust trade handling (#1401)

Fixes #1355

This PR adds dust amount checks for the estimated prices and orders. This was previously ignored and estimated amounts were returned for dust trades when they are not actually matchable.

### Test Plan

Added unit tests and make sure that the GUSD routes work as expected:

<details><summary>Buy amount in base is larger than dust amount</summary>

```
$ curl -s 'http://localhost:8080/api/v1/markets/6-2/estimated-buy-amount/103.19' | jq
{
  "baseTokenId": 6,
  "quoteTokenId": 2,
  "buyAmountInBase": "100",
  "sellAmountInQuote": "103.19"
}
$ curl -s 'http://localhost:8080/api/v1/markets/6-2/estimated-buy-amount/103.18' | jq
{
  "baseTokenId": 6,
  "quoteTokenId": 2,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "103.18"
}
```

</details>

<details><summary>Sell amount <strong>after rounding buffer</strong> is larger than dust amount</summary>

```
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/101' | jq   
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "100.787875",
  "sellAmountInQuote": "101"
}
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/100' | jq
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "100"
}
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/99' | jq 
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "99"
}
```

</details>

12968 of 53101 branches covered (24.42%)

Branch coverage included in aggregate %.

3429 of 5371 relevant lines covered (63.84%)

44073.58 hits per line

Jobs
ID Job ID Ran Files Coverage
3 5103.3 (OPEN_SOLVER_VERSION=v0.0.12 PRIVATE_SOLVER_VERSION=v0.8.4) 08 Sep 2020 11:11AM UTC 0
28.04
Travis Job 5103.3
Source Files on build 5103
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5103
  • 44f5e1df on github
  • Prev Build on master (#5100)
  • Next Build on master (#5105)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc