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

Support webhook signature header #174

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Support webhook signature header #174

merged 1 commit into from
Sep 3, 2024

Conversation

chaoyaji-cb
Copy link
Contributor

What changed? Why?

  • Added the signature header attribute when create webhook
  • Adjusted the unit tests and added a webhook factory

Qualified Impact

Testing

pry(main)> Coinbase::Webhook.create(network_id:"base-mainnet", notification_uri:"https://realtest.com", event_type:"erc20_transfer", event_filters: [{ contract_address: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}], signature_header: 'example_header')
=> Coinbase::Webhook{id: '66ce48aafa6291d3192f170f', network_id: 'base-mainnet', event_type: 'erc20_transfer', notification_uri: 'https://realtest.com', event_filters: '[{"contract_address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}]', signature_header: 'example_header'}

pry(main)> tmp.update(notification_uri: 'https://updatedrealtest.com')
=> Coinbase::Webhook{id: '66ce48aafa6291d3192f170f', network_id: 'base-mainnet', event_type: 'erc20_transfer', notification_uri: 'https://updatedrealtest.com', event_filters: '[{"contract_address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}]', signature_header: 'example_header'}
image

add signature header to webhook.rb

ut with factory

lint
@chaoyaji-cb chaoyaji-cb merged commit f190b69 into v0.3.0 Sep 3, 2024
15 of 17 checks passed
@Stanmar01
Copy link

Stanmar01 commented Sep 3, 2024 via email

@alex-stone alex-stone deleted the webhook-signature branch September 5, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants