@@ -7,7 +7,7 @@ import React, { FC, useCallback, useEffect } from 'react'
77import { Collapsible , ConfirmModal , LoadingCircles } from '~/libs/ui'
88import { UserProfile } from '~/libs/core'
99
10- import { getPayments , processPayments } from '../../../lib/services/wallet'
10+ import { getPayments , processWinningsPayments } from '../../../lib/services/wallet'
1111import { Winning , WinningDetail } from '../../../lib/models/WinningDetail'
1212import { FilterBar } from '../../../lib'
1313import { ConfirmFlowData } from '../../../lib/models/ConfirmFlowData'
@@ -158,15 +158,15 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
158158 position : toast . POSITION . BOTTOM_RIGHT ,
159159 } )
160160 try {
161- await processPayments ( winningIds )
161+ await processWinningsPayments ( winningIds )
162162 toast . success ( 'Payments processed successfully!' , {
163163 position : toast . POSITION . BOTTOM_RIGHT ,
164164 } )
165165 } catch ( error ) {
166166 let message = 'Failed to process payments. Please try again later.'
167167
168168 if ( error instanceof AxiosError ) {
169- message = error . response ?. data ?. error ?. message
169+ message = error . response ?. data ?. error ?. message ?? error . response ?. data ?. message ?? error . message ?? ''
170170
171171 message = message . charAt ( 0 )
172172 . toUpperCase ( ) + message . slice ( 1 )
0 commit comments