-
Notifications
You must be signed in to change notification settings - Fork 78
Add callback for guarded transcations #1701
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
Conversation
Summary of ChangesHello @mgavrila, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the transaction signing process by providing developers with more control and flexibility. It introduces a new callback mechanism that allows for custom processing of signed transactions before they are finalized and the signing interface is dismissed. Additionally, it exposes a new action to programmatically manage the state of the signing UI, improving adaptability for various Dapp integration scenarios. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Summary of ChangesHello @mgavrila, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the transaction signing experience by providing developers with more granular control over the user interface and introducing a flexible callback mechanism. It allows for dynamic management of the signing UI's visibility and the execution of custom logic immediately after transactions are signed, thereby improving the adaptability and integration capabilities for dApp interactions. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a callback for post-processing signed transactions and exposes a new configuration setter, setIsSigningUiEnabled. The overall direction is good, but there are a few issues to address. I've found a leftover debugging statement and a ts-ignore that should be removed. More importantly, the new callback option isn't consistently passed through all provider strategies, which makes the feature incomplete for several providers. My detailed comments are below.
src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts
Show resolved
Hide resolved
src/providers/strategies/helpers/signTransactions/signTransactions.ts
Outdated
Show resolved
Hide resolved
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.
Code Review
This pull request introduces a new callback option for the signTransactions flow, which allows for processing signed transactions before they are sent for guardian approval. It also adds a new setIsSigningUiEnabled action to control the visibility of the signing UI. The implementation of the new features seems correct, but I've identified a critical issue with a method signature mismatch that will prevent the code from working, as well as a leftover debug statement that should be removed. Please see my detailed comments.
src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts
Show resolved
Hide resolved
src/providers/strategies/helpers/signTransactions/signTransactions.ts
Outdated
Show resolved
Hide resolved
|
add callback docs in README.md. What can it be used for? Example: verify/validate the signed transactions with a processing function bevore closing the UI and receiving them |
Feature
setIsSigningUiEnabledfor toggling on/off signing UI screenscallbackforsignTransactionsbefore panel closeContains breaking changes
Updated CHANGELOG
Testing