Skip to content

Commit

Permalink
fix(wallet): explicitly convert error to JSON to don't pass stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jan 12, 2023
1 parent 05c0424 commit 3948153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aepp-wallet-communication/rpc/RpcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export default class RpcClient <
id: number,
method: keyof RemoteApi | keyof LocalApi, // TODO: remove as far it is not required in JSON RPC
result?: any,
error?: any,
error?: RpcError,
): void {
this.connection.sendMessage({
jsonrpc: '2.0',
id,
method,
...error != null ? { error } : { result },
...error != null ? { error: error.toJSON() } : { result },
});
}

Expand Down

0 comments on commit 3948153

Please sign in to comment.