Skip to content

Swap speed up cancel errors#2637

Draft
DanielSinclair wants to merge 1 commit intomainfrom
cursor/swap-speed-up-cancel-errors-6bc8
Draft

Swap speed up cancel errors#2637
DanielSinclair wants to merge 1 commit intomainfrom
cursor/swap-speed-up-cancel-errors-6bc8

Conversation

@DanielSinclair
Copy link
Collaborator

@DanielSinclair DanielSinclair commented Feb 25, 2026

Implement transaction speed-up and cancel functionality to address previous errors caused by the absence of these features in RainbowKit.

The previous transaction system in RainbowKit only tracked basic transaction status and did not support replacing pending transactions with higher gas prices (speed-up) or 0-value self-transactions (cancel). This PR introduces these core functionalities, along with new hooks (useSpeedUpTransaction, useCancelTransaction), UI updates, and comprehensive unit tests, resolving the reported "send transaction errors" for these operations.


Slack Thread

Open in Web Open in Cursor 


PR-Codex overview

This PR introduces functionality for speeding up and canceling pending transactions in the rainbowkit package. It adds hooks and modifies transaction handling to improve user experience when managing transactions.

Detailed summary

  • Added useSpeedUpTransaction and useCancelTransaction hooks for transaction management.
  • Enhanced transactionStore to support new fields: nonce, from, to, value, data, gasPrice, maxFeePerGas, maxPriorityFeePerGas, and replacedBy.
  • Implemented replaceTransaction function to update transaction status.
  • Updated TxItem component to include buttons for speeding up and canceling transactions.
  • Modified transaction handling in Example component to utilize new hooks and manage fees.
  • Added tests for useSpeedUpTransaction and useCancelTransaction to ensure proper functionality and error handling.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

- Extended Transaction interface to support nonce, gas parameters, and replacement tracking
- Created useSpeedUpTransaction hook for increasing gas on pending transactions
- Created useCancelTransaction hook for canceling pending transactions
- Updated TxItem component with speed up/cancel buttons for pending transactions
- Added comprehensive unit tests for both hooks
- Updated example app to demonstrate nonce and gas tracking
- Exported new hooks from main package index
@cursor
Copy link

cursor bot commented Feb 25, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rainbowkit-example Building Building Preview, Comment Feb 25, 2026 0:59am
rainbowkit-site Building Building Preview, Comment Feb 25, 2026 0:59am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants