Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds custom inspect function to PublicKey #23055

Closed

Conversation

stellaw1
Copy link
Contributor

Problem

Public Keys are logged in a not-so-great format when console logged in Node.Js.

Example:

//   authorizedPubkey: PublicKey {
//     _bn: <BN: 919981a5497e8f85c805547439ae59f607ea625b86b1138ea6e41a68ab8ee038>
//   },

Summary of Changes

  • Added a custom inspect function to PublicKey that returns its string format
  • Added tests for the custom inspect function

Fixes #20022

@mergify mergify bot added the community Community contribution label Feb 10, 2022
@mergify mergify bot requested a review from a team February 10, 2022 10:12
@stellaw1 stellaw1 marked this pull request as ready for review February 10, 2022 18:53
@stellaw1 stellaw1 force-pushed the prettify-publickey-logging branch from a5ab59b to 332e11a Compare February 16, 2022 07:58
@stellaw1
Copy link
Contributor Author

Blocked by Flow - the custom inspect function that overrides console.log uses computed property names which is an ES6 feature that is not yet supported by the flow library (seen here).

@stellaw1 stellaw1 closed this Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prettify Node.Js Web3 Public Key Logging
1 participant