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

Efficiency and typing improvements for webhooks and use native implementations #170

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

brettwillis
Copy link
Contributor

  • Use built-in crypto implementations and remove crypto-js and buffer-equal-constant-time dependencies
  • Eliminate un-necessary conversions back and forth between buffers and strings (signature is parsed as hex)
  • Eliminate un-necessary array copy (.map(eventJson => eventJson))
  • Improve typings by specifying the return type as Event[]
  • Improve typings by allowing the body to be passed in as crypto.BinaryLike which can eliminate un-necessary conversions between buffers and strings
  • Export verifySignature()

May supercede #167 (sorry 🙏🏼 )

Remove unnecessary buffer conversions
Improve typings
Export verifySignature
@bekundayo
Copy link
Contributor

Hi @brettwillis

Do you know when this will be released, please?

We have a ticket for this : https://gocardless.atlassian.net/browse/PDFR-32681

@brettwillis
Copy link
Contributor Author

brettwillis commented Jan 18, 2024

I don't have access to that ticket, and I cannot merge this PR. Need a maintainer perhaps @prolific117 or @barrucadu ?

Copy link
Contributor

@bekundayo bekundayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution ❤️

@bekundayo bekundayo merged commit 21b005e into gocardless:master Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants