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

safe-global / safe-core-sdk-react-hooks / 11255060908
96%

Build:
DEFAULT BRANCH: main
Ran 09 Oct 2024 12:38PM UTC
Jobs 1
Files 51
Run time 1min
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

09 Oct 2024 12:34PM UTC coverage: 95.658% (-0.07%) from 95.724%
11255060908

push

github

web-flow
feat: Hooks to update Safe threshold + owners (#13)

* Use `useMutation` from `@tanstack/react-query` instead of from `wagmi/query`

* Remove debug log line

* refactor: Update `useSendTransaction` to handle SafeTransaction objects

The useSendTransaction hook now handles both TransactionBase and SafeTransaction objects. It maps the transactions array and converts any SafeTransaction objects to the required format before sending them to the signerClient.

* Add `isOwnerConnected` flag

It defines whether the connected signer is an owner of the configured Safe

* Add `useSignerClientMutation` hook for sending custom mutations via the SafeClient

* Add UpdateThreshold hook for updating the threshold of the connected Safe

* Add 'useAddOwner' hook for adding an owner to the connected Safe

* Add `useRemoveOwner` hook for removing an owner from the connected Safe

* Add `useSwapOwner` hook for swapping an owner of the connected Safe

* Add `useUpdateOwners` hook for managing owners of the connected Safe

It wraps the individual hooks:
- `useAddOwner`
- `useRemoveOwner`
- `useSwapOwner`

* refactor: Update usePendingTransactions to use usePublicClientQuery

Refactor the usePendingTransactions hook to use the usePublicClientQuery hook instead of the usePublicClient hook.

* Unit tests for `useSignerClientMutation` hook

* refactor: Update `useUpdateThreshold` hook to use `useSignerClientMutation`

* Unit tests for `useUpdateThreshold` hook

* refactor: Update `useSendTransaction` hook to use `useSignerClientMutation`

* refactor: Update `useConfirmTransaction` hook to use `useSignerClientMutation`

* Add unit tests for `useUpdateOwners` hook

Also add fixtures for mutation result objects

* Refactor tests to use mutation result object fixtures that were added in previous commit

* Add unit tests for `useRemoveOwner` hook

* Add unit tests for `useSwapOwner` hook

* Fix tests

* Add unit tests for `useUp... (continued)

155 of 176 branches covered (88.07%)

Branch coverage included in aggregate %.

147 of 147 new or added lines in 25 files covered. (100.0%)

528 of 538 relevant lines covered (98.14%)

20.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11255060908.1 09 Oct 2024 12:38PM UTC 0
95.66
GitHub Action Run
Source Files on build 11255060908
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #11255060908
  • 6e40ebc8 on github
  • Prev Build on main (#11066699570)
  • Next Build on main (#11271008633)
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