Skip to content
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

[ENG-3474] feat: Make UI for STX RBF in the extension #727

Merged
merged 41 commits into from
Jan 11, 2024

Conversation

dhriaznov
Copy link
Contributor

@dhriaznov dhriaznov commented Dec 21, 2023

🔘 PR Type

What kind of change does this PR introduce?

  • Enhancement

📜 Background

This feature is needed to help our Stacks users increase the chance of getting their pending transactions included in the next Stacks anchor block, by increasing the transaction fee.

Issue Link: #[ENG-3474]
Context Link (if applicable):

🔄 Changes

  • Added useRbfTransactionData hook
  • Updated the Speed Up Tx page to add the STX functionality
  • Added the Speed Up button to src/app/components/transactions/stxTransferTransaction.tsx component
  • Removed the unused code in src/app/components/transactions/stxTransaction.tsx component
  • Removed the unused src/assets/img/transactions/increaseFee.svg icon

Impact:

  • This PR impacts both BTC and STX RBF features

🖼 Screenshot / 📹 Video

The demo videos are in the linear ticket.

Monosnap Monosnap 2023-12-28 17-00-19
Monosnap Monosnap 2023-12-28 17-00-27
Monosnap Monosnap 2023-12-28 17-00-37
Monosnap Monosnap 2023-12-28 17-00-59

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

@dhriaznov dhriaznov self-assigned this Dec 21, 2023
teebszet
teebszet previously approved these changes Jan 10, 2024
Comment on lines 8 to 12
stxToMicrostacks,
StxTransactionData,
} from '@secretkeylabs/xverse-core';
import { deserializeTransaction, estimateTransaction } from '@stacks/transactions';
import { isLedgerAccount, microStxToStx } from '@utils/helper';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: xverse-core already exports stxToMicrostacks and microstacksToStx

Suggested change
stxToMicrostacks,
StxTransactionData,
} from '@secretkeylabs/xverse-core';
import { deserializeTransaction, estimateTransaction } from '@stacks/transactions';
import { isLedgerAccount, microStxToStx } from '@utils/helper';
stxToMicrostacks,
microstacksToStx
StxTransactionData,
} from '@secretkeylabs/xverse-core';
import { deserializeTransaction, estimateTransaction } from '@stacks/transactions';
import { isLedgerAccount } from '@utils/helper';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downside here is that microstacksToStx requires a BigNumber-only param, but of course we can convert it

@teebszet
Copy link
Member

teebszet commented Jan 10, 2024

@dhriaznov thanks for making the code improvements. let's merge this after the base branch is merged

@teebszet teebszet changed the base branch from denys/eng-3436-make-some-code-refactoring-for-rbf-in-the-extension to develop January 10, 2024 07:36
@teebszet teebszet dismissed their stale review January 10, 2024 07:36

The base branch was changed.

@dhriaznov
Copy link
Contributor Author

Thanks for the review @teebszet! I resolved the git conflicts and applied the above code suggestions

teebszet
teebszet previously approved these changes Jan 10, 2024
@DuskaT021
Copy link
Contributor

@dhriaznov needs conflicts resolved

…on into denys/eng-3474-make-ui-for-stx-rbf-in-the-extension
Copy link

@dhriaznov dhriaznov merged commit 5268863 into develop Jan 11, 2024
5 checks passed
@teebszet teebszet deleted the denys/eng-3474-make-ui-for-stx-rbf-in-the-extension branch January 11, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants