import { request } from '@/api'

// 提现订单列表
export const getWithdrawOrderList = (params: {
  page: number
  page_size: number
  start_time?: string
  end_time?: string
  status?: string
}) => {
  return request.get('/upay/withdrawOrderList', params as any)
}

// 刷新地址余额
export const balanceRefresh = (params: { address?: string, addressType?: string }) => {
  return request.post('/upay/balanceRefresh', params)
}

// 提现地址列表
export const getAddressList = (params: {
  page: number
  page_size: number
  address?: string
  addressType?: string
}) => {
  return request.post('/upay/addressList', params as any)
}

// 提现
export const withdrawAction = (params: {
  from: string
  to: string
  amount: string
}) => {
  return request.post('/upay/withdrawAction', params)
}
