import { useContext } from 'react';
import { ManageApprovalTransactionContext } from './ApprovalTransactionContext';

const useTransactionContext = () => {
  const context = useContext(ManageApprovalTransactionContext);

  if (!context) throw new Error('useTransactionContext must be used within AuthProvider');

  return context;
};

export { useTransactionContext };
