Use invoke/handle in settingsChannel

This commit is contained in:
Fedor Indutny 2021-11-10 01:56:56 +01:00 committed by GitHub
parent 37992715cd
commit 631e36dc0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 597 additions and 810 deletions

View file

@ -2,7 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-console */
import { getCliOptions, getPrintableError } from './common';
import * as Errors from '../types/errors';
import { getCliOptions } from './common';
import { keyPair } from './curve';
import { writeHexToPath } from './signature';
@ -33,7 +34,7 @@ type OptionsType = {
const cliOptions = getCliOptions<OptionsType>(OPTIONS);
go(cliOptions).catch(error => {
console.error('Something went wrong!', getPrintableError(error));
console.error('Something went wrong!', Errors.toLogFormat(error));
});
async function go(options: OptionsType) {