Split rpc.system.* definitions (#4906)

This commit is contained in:
Jaco
2022-06-08 12:28:03 +03:00
committed by GitHub
parent 89a2ff2cda
commit 7edff67240
5 changed files with 149 additions and 133 deletions
+5 -1
View File
@@ -42,7 +42,11 @@ const EMPTY_META = {
// utility method to create a nicely-formatted error
/** @internal */
function logErrorMessage (method: string, { params, type }: DefinitionRpc, error: Error): void {
function logErrorMessage (method: string, { noErrorLog, params, type }: DefinitionRpc, error: Error): void {
if (noErrorLog) {
return;
}
const inputs = params.map(({ isOptional, name, type }): string =>
`${name}${isOptional ? '?' : ''}: ${type}`
).join(', ');