@@ -7,11 +7,6 @@ import { showDialog } from 'src/utils/interactive';
77import { fyo } from './initFyo' ;
88import router from './router' ;
99import { getErrorMessage , stringifyCircular } from './utils' ;
10- import {
11- sendError as ipcSendError ,
12- openExternalUrl ,
13- showError ,
14- } from './utils/ipcCalls' ;
1510import type { DialogOptions , ToastOptions } from './utils/types' ;
1611
1712function shouldNotStore ( error : Error ) {
@@ -46,7 +41,7 @@ export async function sendError(errorLogObj: ErrorLog) {
4641 console . log ( 'sendError' , body ) ;
4742 }
4843
49- await ipcSendError ( JSON . stringify ( body ) ) ;
44+ await ipc . sendError ( JSON . stringify ( body ) ) ;
5045}
5146
5247function getToastProps ( errorLogObj : ErrorLog ) {
@@ -157,7 +152,7 @@ export async function showErrorDialog(title?: string, content?: string) {
157152 // To be used for show stopper errors
158153 title ??= t `Error` ;
159154 content ??= t `Something has gone terribly wrong. Please check the console and raise an issue.` ;
160- await showError ( title , content ) ;
155+ await ipc . showError ( title , content ) ;
161156}
162157
163158// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -234,7 +229,7 @@ function getIssueUrlQuery(errorLogObj?: ErrorLog): string {
234229
235230export function reportIssue ( errorLogObj ?: ErrorLog ) {
236231 const urlQuery = getIssueUrlQuery ( errorLogObj ) ;
237- openExternalUrl ( urlQuery ) ;
232+ ipc . openExternalUrl ( urlQuery ) ;
238233}
239234
240235function getErrorLabel ( error : Error ) {
0 commit comments