import api from 'src/api'

export const getBalance = async () => {
  const { data } = await api.get('/provider/withdrawals/balance')
  return data.payload
}

export const getWithdrawalFees = async () => {
  const { data } = await api.get('/provider/withdrawals/fees')
  return data.payload
}

export const getWithdrawals = async () => {
  const { data } = await api.get('/provider/withdrawals')
  return data.payload
}

export const requestWithdrawal = async (payload = {}) => {
  const { data } = await api.post('/provider/withdrawals', payload)
  return data.payload
}
