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

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

Build:
DEFAULT BRANCH: main
Ran 21 Feb 2025 09:15AM UTC
Jobs 2
Files 827
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

21 Feb 2025 09:12AM UTC coverage: 91.122% (+0.008%) from 91.114%
13453624767

push

github

web-flow
feat: only allow adding wallets with signature (#2345)

This modifies the current endpoint for adding a `Wallet` to a `User` to expect a SiWe `message` and `signature`, which must pass validation in order to succeed.

The `POST` `/v1/wallet/:walletAddress` endpoint now becomes `/v1/wallet/add`, which requires the original access token cookie, as well as the following request:

```ts
type Request = {
  message: string;
  signature: `0x${string}`
}
```

The `message` is parsed according to EIP-4362 (Sign-In with Ethereum) and the `signature` validated accordingly. The recovered address is that which a `Wallet` is created for.

As with other endpoints, the access token cookie is responsible for finding the `User` - the `address` of the token:

- Rename `POST` `/v1/wallet/:walletAddress` to `/v1/wallet/add`, and expect/validate payload
- Add `SiweMessageSchema`, responsible for parsing a string `message` to an object
- Add `ISiweRepository['getValidatedSiweMessage']`, responsible for returning a parsed/validated string `message` as an object
- Add/update tests accordingly

3016 of 3633 branches covered (83.02%)

Branch coverage included in aggregate %.

31 of 32 new or added lines in 5 files covered. (96.88%)

1 existing line in 1 file now uncovered.

10419 of 11111 relevant lines covered (93.77%)

507.35 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
91.18
1.38% src/domain/siwe/siwe.repository.ts

Uncovered Existing Lines

Lines Coverage ∆ File
1
91.95
-1.34% src/routes/notifications/v1/notifications.controller.ts
Jobs
ID Job ID Ran Files Coverage
1 run-test:e2e:cov - 13453624767.1 21 Feb 2025 09:15AM UTC 1472
50.6
GitHub Action Run
2 run-test:cov - 13453624767.2 21 Feb 2025 09:18AM UTC 1621
91.96
GitHub Action Run
Source Files on build 13453624767
  • Tree
  • List 827
  • Changed 244
  • Source Changed 5
  • Coverage Changed 224
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #13453624767
  • d989b2ab on github
  • Prev Build on main (#13437334431)
  • Next Build on main (#13453839703)
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