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

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

Build:
DEFAULT BRANCH: main
Ran 22 Apr 2024 01:19PM UTC
Jobs 2
Files 617
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

22 Apr 2024 01:17PM UTC coverage: 92.23% (-0.4%) from 92.604%
8784763765

push

github

web-flow
Add support for Swap orders in tx confirmation route (#1435)

Adds support for CoW Swap Orders in `POST chains/:chainId/safes/:safeAddress/views/transaction-confirmation` route. If a CoW Swap Order is found, the type of the Transaction Confirmation View would be of `COW_SWAP_ORDER`.

A `COW_SWAP_ORDER` confirmation view would have, in addition to what is returned by a `GENERIC` view, the properties of an `Order` (which can also be found on the transaction decoding done for the History and Queue endpoints).

The Cow Swap Confirmation view is returned if:
- The Order data was successfully retrieved
- The Token data (buy and sell) were successfully retrieved and is considered valid (e.g. with decimal information)
- The Order is considered valid (by the Safe{Wallet} standards) – e.g. order kind should not be `unknown`.

```
POST chains/:chainId/safes/:safeAddress/views/transaction-confirmation

{
  "type": COW_SWAP_ORDER",
  "method": "string",
  "parameters": "DataDecodedParameter[]",
  "uid": "string",
  "status": "presignaturePending | open | fulfilled | cancelled | expired | unknown",
  "kind": "buy | sell",
  "orderClass": "market | limit | liquidity | unknown",
  "validUntil": "number (timestamp)",
  "sellAmount": "string (raw amount, no decimals)",
  "buyAmount": "string (raw amount, no decimals)",
  "executedSellAmount": "string (raw amount, no decimals)",
  "executedBuyAmount": "string (raw amount, no decimals)",
  "explorerUrl": "URL (string format URL)",
  "executedSurplusFee": "string | null",
  "sellToken": "TokenInfo (object with properties of TokenInfo)",
  "buyToken": "TokenInfo (object with properties of TokenInfo)"
}
```

Changes:

- Adds a new `ConfirmationView` type – `CowSwapConfirmationView`.
- The `CowSwapConfirmationView` contains the baseline data expected for the Transaction Confirmation View screen plus the CoW Swap Order data if it was successfully retrieved.

1921 of 2339 branches covered (82.13%)

Branch coverage included in aggregate %.

37 of 68 new or added lines in 4 files covered. (54.41%)

6898 of 7223 relevant lines covered (95.5%)

311.61 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
57.58
0.0% src/routes/transactions/entities/swaps/swap-order-info.entity.ts
15
64.58
-20.03% src/routes/transactions/entities/confirmation-view/confirmation-view.entity.ts
15
21.62
-35.52% src/routes/transactions/transactions-view.service.ts
Jobs
ID Job ID Ran Files Coverage
1 run-test:e2e:cov - 8784763765.1 22 Apr 2024 01:19PM UTC 1020
50.99
GitHub Action Run
2 run-test:cov - 8784763765.2 22 Apr 2024 01:22PM UTC 1223
93.07
GitHub Action Run
Source Files on build 8784763765
  • Tree
  • List 617
  • Changed 70
  • Source Changed 5
  • Coverage Changed 156
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #8784763765
  • becda8f8 on github
  • Prev Build on main (#8783016962)
  • Next Build on main (#8785390646)
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