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

safe-global / safe-client-gateway / 8753281205
89%

Build:
DEFAULT BRANCH: main
Ran 19 Apr 2024 12:11PM UTC
Jobs 2
Files 613
Run time 2min
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

19 Apr 2024 12:09PM UTC coverage: 92.676% (-0.001%) from 92.677%
8753281205

push

github

web-flow
Return non formatted Order data (#1426)

The service was previously following a render-ready approach when it came to Swap Orders (i.e.: pre-formatted labels that should be rendered as is).

While this approach is a valid one, the current setup that we have on the Wallet doesn't allow for this type of localisation to be driven by this web service.

Some examples include:
- Position of the currency symbol
- Use of comma vs period for thousands or decimals
- Difference in representation of negative amounts
- LTR vs RTL

Given that in the current state, the frontend clients are expected to have more information regarding the user localisation, this responsibility is then shifted from the CGW to the clients.

This has a couple implications on the API:
- Removes the following labels (they now need to be computed on the client side):
  * feeLabel
  * executionPriceLabel
  * surplusLabel
  * filledPercentage
- Extends the `TokenInfo` with:
  * Token name
  * trusted status
- Token amounts are now returned without decimals (correct decimal formatting should be set by the clients).


{
  "type": "SwapOrder",
  "uid": "string",
  "status": "presignaturePending | open | fulfilled | cancelled | expired | unknown",
  "kind": "buy | sell",
  "class": "market | limit | liquidity | unknown"
  "validUntil": "number",
  "sellAmount": "string",
  "buyAmount": "string",
  "executedSellAmount": "string",
  "executedBuyAmount": "string",
  "sellToken": "TokenInfo", // see below
  "buyToken": "TokenInfo",  // see below
  "explorerUrl": "URL",
  "executedSurplusFee": "string | null"
}

"TokenInfo": {
  "address": "0x{string}",
  "decimals": "number",
  "logoUri": "string | null",
  "name": "string",
  "symbol": "string",
  "trusted": "boolean"
}

1929 of 2326 branches covered (82.93%)

Branch coverage included in aggregate %.

58 of 59 new or added lines in 5 files covered. (98.31%)

1 existing line in 1 file now uncovered.

6840 of 7136 relevant lines covered (95.85%)

308.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
88.1
-3.11% src/routes/transactions/mappers/common/swap-order.mapper.ts

Uncovered Existing Lines

Lines Coverage ∆ File
1
80.0
-10.0% src/routes/transactions/entities/__tests__/human-description.builder.ts
Jobs
ID Job ID Ran Files Coverage
1 run-test:e2e:cov - 8753281205.1 19 Apr 2024 12:11PM UTC 1006
50.81
GitHub Action Run
2 run-test:cov - 8753281205.2 19 Apr 2024 12:13PM UTC 1215
93.53
GitHub Action Run
Source Files on build 8753281205
  • Tree
  • List 613
  • Changed 70
  • Source Changed 5
  • Coverage Changed 153
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #8753281205
  • facf0163 on github
  • Prev Build on main (#8751903130)
  • Next Build on main (#8755366375)
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

© 2025 Coveralls, Inc