Skip to content

Commit

Permalink
fix: allow connect mutation to be optional (#100)
Browse files Browse the repository at this point in the history
After my last PR #97
exposing `useMutations` options, it started to request arguments on
`connect` (but it should be optional).


| 📷 Evidence |
| --- |
| <img width="743" alt="Screenshot 2024-06-03 at 17 21 53"
src="https://github.com/FuelLabs/fuels-npm-packs/assets/7074983/5a599193-8b82-4a0d-a56a-811d1a8d771a">
|
  • Loading branch information
helciofranco authored Jun 3, 2024
1 parent 56f67a4 commit 30f37c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/small-birds-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion packages/react/src/hooks/useConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const useConnect = () => {
const { fuel } = useFuel();

const { mutate, mutateAsync, ...mutateProps } = useMutation({
mutationFn: async (connectorName?: string | null) => {
mutationFn: async (connectorName?: string | null | void) => {
if (connectorName) {
await fuel.selectConnector(connectorName);
}
Expand Down

0 comments on commit 30f37c8

Please sign in to comment.