import { useContext } from 'react';
import { TransactionWithdrawContext } from './TransactionWithdrawContext';

const useTransactionWithdrawContext = () => {
  const context = useContext(TransactionWithdrawContext);

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

  return context;
};

export { useTransactionWithdrawContext };
