Skip to content

Commit cc2ab74

Browse files
committed
Lint
1 parent d226192 commit cc2ab74

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/apps/wallet-admin/src/home/tabs/payments/PaymentsTab.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
219219
return confirmFlow?.content
220220
}, [confirmFlow])
221221

222+
// eslint-disable-next-line complexity
222223
const updatePayment = async (paymentId: string): Promise<void> => {
223224
const currentEditState = editStateRef.current
224225
// Send to server only the fields that have changed
@@ -262,12 +263,12 @@ const ListView: FC<ListViewProps> = (props: ListViewProps) => {
262263
const updateMessage = await editPayment(updates)
263264
toast.success(updateMessage, { position: toast.POSITION.BOTTOM_RIGHT })
264265
} catch (err:any) {
265-
if(err?.message){
266+
if (err?.message) {
266267
toast.error(err?.message, { position: toast.POSITION.BOTTOM_RIGHT })
267268
} else {
268269
toast.error('Failed to update payment', { position: toast.POSITION.BOTTOM_RIGHT })
269270
}
270-
271+
271272
return
272273
}
273274

src/apps/wallet-admin/src/lib/models/ApiResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApiError } from "./ApiError"
1+
import { ApiError } from './ApiError'
22

33
export default interface ApiResponse<T> {
44
status: 'success' | 'error'

src/apps/wallet-admin/src/lib/services/wallet.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export async function editPayment(updates: {
8686
if (response.error && response.error.message) {
8787
throw new Error(response.error.message)
8888
}
89+
8990
throw new Error('Error editing payment')
9091
}
9192

src/libs/core/lib/xhr/xhr-functions/xhr.functions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ function interceptError(instance: AxiosInstance): void {
176176
error.message = error?.response?.data?.message
177177
} else if (error?.response?.data?.error?.message) {
178178
error.message = error?.response?.data?.error?.message
179-
}
179+
}
180+
180181
// if there is server errors data, then return it inside `errors` property of error
181182
error.errors = error?.response?.data?.errors
182183
return Promise.reject(error)

0 commit comments

Comments
 (0)