UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

12 lines (11 loc) 646 B
import { debug, groupCollapsed, groupEnd, sliceString } from '@broxus/js-utils'; import { errorLabelStyle, inheritTextStyle, successTextStyle } from '../../console'; import { getScanLink } from '../../utils/get-scan-link'; export function syncErrorMessage(name, address, e, networkId) { const link = getScanLink(address.toString(), networkId); groupCollapsed(`%c${name}%c Sync completed with an error`, errorLabelStyle, inheritTextStyle); debug(`Code: ${e.code}`); debug(`Message: ${e.message}`); debug(`${name} address: %c${sliceString(address.toString())}%c ${link}`, successTextStyle, inheritTextStyle); groupEnd(); }