-
Notifications
You must be signed in to change notification settings - Fork 157
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
Fund button - setupOnrampEventListeners util for setting up onSuccess, onEvent and onExit callbacks #1626
base: main
Are you sure you want to change the base?
Conversation
src/fund/types.ts
Outdated
export type PublicErrorEvent = { | ||
eventName: 'error'; | ||
// biome-ignore lint/suspicious/noExplicitAny: <explanation> | ||
error: any; |
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.
these errors aren't type constrained at all?
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.
Addressed this. Added a type
export type PostMessageData = { | ||
eventName: MessageCode; | ||
data?: MessageData; | ||
}; |
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.
do these types need to be exported? didn't see them used anywhere else
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.
Not needed to be exported. Removed export
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
What changed? Why?
Added util function
setupEventSubscriptions
that is used to specifyonEvent
,onExit
andonSuccess
callbacksNotes to reviewers
Example of usage of
setupOnrampEventListeners
How has it been tested?
Unit tests added