Skip to content

Commit

Permalink
chore: Export param types for the addOwner, removeOwner + swapOwner f…
Browse files Browse the repository at this point in the history
…unctions (#19)
  • Loading branch information
tmjssz authored Oct 16, 2024
1 parent f034861 commit a0b08e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/hooks/useUpdateOwners/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ export type UseUpdateOwnersReturnType = {
swap: ReturnType<typeof useSwapOwner>
}

export { type AddOwnerVariables } from './useAddOwner.js'
export { type RemoveOwnerVariables } from './useRemoveOwner.js'
export { type SwapOwnerVariables } from './useSwapOwner.js'

/**
* Hook to manage the owners of the Safe account. It provides methods to add a new owner,
* Hook to manage the owners of the Safe account. It provides methods to add a new owner,
* remove an existing one, and to swap an existing owner in favor of a new one.
* @returns Object wrapping the hooks to update, remove or swap owners.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useUpdateOwners/useAddOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSignerClientMutation } from '@/hooks/useSignerClientMutation.js'
import { useSendTransaction } from '@/hooks/useSendTransaction.js'
import { MutationKey } from '@/constants.js'

type AddOwnerVariables = Parameters<SafeClient['createAddOwnerTransaction']>[0]
export type AddOwnerVariables = Parameters<SafeClient['createAddOwnerTransaction']>[0]

export type UseAddOwnerParams = ConfigParam<SafeConfigWithSigner>
export type UseAddOwnerReturnType = Omit<
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useUpdateOwners/useRemoveOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSendTransaction } from '@/hooks/useSendTransaction.js'
import { useSignerClientMutation } from '@/hooks/useSignerClientMutation.js'
import { MutationKey } from '@/constants.js'

type RemoveOwnerVariables = Parameters<SafeClient['createRemoveOwnerTransaction']>[0]
export type RemoveOwnerVariables = Parameters<SafeClient['createRemoveOwnerTransaction']>[0]

export type UseRemoveOwnerParams = ConfigParam<SafeConfigWithSigner>
export type UseRemoveOwnerReturnType = Omit<
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useUpdateOwners/useSwapOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSignerClientMutation } from '@/hooks/useSignerClientMutation.js'
import { useSendTransaction } from '@/hooks/useSendTransaction.js'
import { MutationKey } from '@/constants.js'

type SwapOwnerVariables = Parameters<SafeClient['createSwapOwnerTransaction']>[0]
export type SwapOwnerVariables = Parameters<SafeClient['createSwapOwnerTransaction']>[0]

export type UseSwapOwnerParams = ConfigParam<SafeConfigWithSigner>
export type UseSwapOwnerReturnType = Omit<
Expand Down

0 comments on commit a0b08e3

Please sign in to comment.