@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
15 lines • 694 B
JavaScript
import { useAddOwner } from './useAddOwner.js';
import { useRemoveOwner } from './useRemoveOwner.js';
import { useSwapOwner } from './useSwapOwner.js';
/**
* 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.
*/
export function useUpdateOwners(params = {}) {
const add = useAddOwner({ config: params.config });
const remove = useRemoveOwner({ config: params.config });
const swap = useSwapOwner({ config: params.config });
return { add, remove, swap };
}
//# sourceMappingURL=index.js.map