Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge 44e9a37 into cd458ce
Browse files Browse the repository at this point in the history
  • Loading branch information
pmespresso committed Jan 2, 2019
2 parents cd458ce + 44e9a37 commit 58760aa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/api/src/transport/ws/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,14 @@ class Ws extends JsonRpcBase {

// Don't print error if request rejected or not is not yet up...
if (!/(rejected|not yet up)/.test(result.error.message)) {
console.error(`${method}(${JSON.stringify(params)}): ${result.error.code}: ${result.error.message}`);
const dangerous_methods = ['signer_confirmRequest', 'signer_confirmRequestWithToken'];
let safe_params;
if (dangerous_methods.includes(method)) {
safe_params = params.slice();
safe_params[params.length - 1] = '***';
}

console.error(`${method}(${JSON.stringify(`${safe_params || params}`)}): ${result.error.code}: ${result.error.message}`);
}

const error = new TransportError(method, result.error.code, result.error.message);
Expand Down

0 comments on commit 58760aa

Please sign in to comment.