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

const useTransactionTopupContext = () => {
  const context = useContext(TransactionTopupContext);

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

  return context;
};

export { useTransactionTopupContext };
