-
Notifications
You must be signed in to change notification settings - Fork 31
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
update webhook bugfix #288
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,10 +185,13 @@ export class Webhook { | |
notificationUri, | ||
eventTypeFilter, | ||
}: UpdateWebhookOptions): Promise<Webhook> { | ||
const finalNotificationUri = notificationUri ?? this.getNotificationURI(); | ||
const finalEventTypeFilter = eventTypeFilter ?? this.getEventTypeFilter(); | ||
|
||
const result = await Coinbase.apiClients.webhook!.updateWebhook(this.getId()!, { | ||
notification_uri: notificationUri, | ||
notification_uri: finalNotificationUri, | ||
event_filters: this.getEventFilters()!, | ||
event_type_filter: eventTypeFilter, | ||
event_type_filter: finalEventTypeFilter, | ||
}); | ||
Comment on lines
191
to
195
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all of those props required on the request? What about not sending it, if user hasn't sent on the SDK function param? It would be ideal to the API request to mimic what user intended, this could also possibly prevent issues in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because on the CDP side this is a |
||
|
||
this.model = result.data; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add 1 more test where we update the event type filter and not the notification URI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.