extension
extension copied to clipboard
feat: remove increase fee summary dialog, closes #5305
Try out Leather build 67058a1 β Extension build, Test report, Storybook, Chromatic
This pr removes increase fee summary step, and just shows toast on broadcasting RBF transaction both in btc and all stacks related send flows. discussed here
Summary by CodeRabbit
-
New Features
- Enhanced transaction submission with customized toast messages based on fee increase status.
-
Improvements
- Updated Bitcoin fee increase transactions to display a success message and redirect to the activity page.
- Enhanced Stacks fee dialog to include additional transaction parameters for better handling.
-
Bug Fixes
- Disabled state for fee increase actions now aligned with the broadcasting status.
-
Removals
- Removed the
IncreaseFeeSentDialog
component and its associated route.
- Removed the
-
Refactor
- Consolidated transaction broadcast function calls to use object parameters for better clarity and maintainability.
Walkthrough
This update enhances the transaction submission process by adding new parameters and success messages. Key changes include the introduction of an isIncreaseFeeTransaction
parameter to differentiate between normal and fee increase transactions, updating toast messages, and modifying navigation routes. Additionally, the IncreaseFeeSent
route has been removed, and related components have been adjusted accordingly.
Changes
Files/Paths | Change Summaries |
---|---|
src/.../use-submit-stx-transaction.ts |
Added isIncreaseFeeTransaction parameter to useSubmitTransactionCallback and updated toast messages accordingly. |
src/.../increase-fee-actions.tsx |
Added disabled prop to IncreaseFeeActions component. |
src/.../use-btc-increase-fee.ts |
Updated behavior to show success toast and navigate to activity route after fee increase. |
src/.../increase-btc-fee-dialog.tsx |
Set isDisabled property to isBroadcasting in IncreaseFeeActions component. |
src/.../increase-stx-fee-dialog.tsx |
Modified useStacksBroadcastTransaction call to include { token: 'STX', isIncreaseFeeTransaction: true } . |
src/.../use-stacks-broadcast-transaction.tsx |
Added isIncreaseFeeTransaction argument to handle transactions and navigation. |
src/.../stacks-send-form-confirmation.tsx |
Updated useStacksBroadcastTransaction call to pass an object with token and decimals properties. |
src/.../use-stacks-broadcast-swap.tsx |
Added success toast message "Transaction submitted!" to onSuccess callback. |
src/.../transaction-request.tsx |
Modified useStacksBroadcastTransaction call to pass an object with token set to 'STX' . |
src/.../app-routes.tsx |
Removed IncreaseFeeSentDialog component import and route. |
src/shared/route-urls.ts |
Removed IncreaseFeeSent route from RouteUrls enum. |
In the realm of code, where transactions flow,
A rabbit hops with joy, updates in tow.
Fees increase with ease, messages toast,
To the activity route, we now coast.
With routes refined, and dialogs clear,
The code runs smoother, letβs cheer!
πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>.
-
Generate unit testing code for this file.
-
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitai
in a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file.
-
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitai
in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table.
-
@coderabbitai show all the console.log statements in this repository.
-
@coderabbitai read src/utils.ts and generate unit testing code.
-
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
-
@coderabbitai pause
to pause the reviews on a PR. -
@coderabbitai resume
to resume the paused reviews. -
@coderabbitai review
to trigger a review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai resolve
resolve all the CodeRabbit review comments. -
@coderabbitai help
to get help.
Additionally, you can add @coderabbitai ignore
anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml
)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yaml
file to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@alter-eggo mind attaching a screen recording of the new UX to this PR as part of the description? π Ideally for all flows affected (e.g. BTC and STX sends)
Also, do have an issue to link to this PR?
SXT https://github.com/leather-wallet/extension/assets/46521087/28c4b5c5-6065-447e-800d-d6a2a5ae80ac
BTC https://github.com/leather-wallet/extension/assets/46521087/31fcac22-68f5-411b-9312-a3dfbd224a93