(step, status)
| 42 | } |
| 43 | |
| 44 | async function setStepStatus(step, status) { |
| 45 | const state = await getState(); |
| 46 | const statuses = { ...state.stepStatuses }; |
| 47 | statuses[step] = status; |
| 48 | await setState({ stepStatuses: statuses, currentStep: step }); |
| 49 | chrome.runtime.sendMessage({ |
| 50 | type: 'STEP_STATUS_CHANGED', |
| 51 | payload: { step, status }, |
| 52 | }).catch(() => { }); |
| 53 | } |
| 54 | |
| 55 | function getErrorMessage(error) { |
| 56 | return String(typeof error === 'string' ? error : error?.message || ''); |
no test coverage detected