Skip to content

REF: convert fee-bump screens (CPFP, RBF) to TypeScript functional components#126

Open
NAME-ASHWANIYADAV wants to merge 1 commit into
CypherCommons:masterfrom
NAME-ASHWANIYADAV:ref/convert-fee-bump-screens-to-tsx
Open

REF: convert fee-bump screens (CPFP, RBF) to TypeScript functional components#126
NAME-ASHWANIYADAV wants to merge 1 commit into
CypherCommons:masterfrom
NAME-ASHWANIYADAV:ref/convert-fee-bump-screens-to-tsx

Conversation

@NAME-ASHWANIYADAV

Copy link
Copy Markdown

Closes #125

What

Convert the three fee-bump transaction screens from JavaScript Class Components
to TypeScript Functional Components:

  • screen/transactions/CPFP.js -> CPFP.tsx
  • screen/transactions/RBFBumpFee.js -> RBFBumpFee.tsx
  • screen/transactions/RBFCancel.js -> RBFCancel.tsx

Why

  • CONTRIBUTING.md states "All new files must be in TypeScript"
  • These were the last Class Components using PropTypes, this.state,
    and componentDidMount - now modernized to hooks
  • Removes runtime PropTypes in favor of TypeScript static types
  • Replaces legacy BlueCurrentTheme with useTheme() hook
  • Replaces class contextType = StorageContext with useStorage() hook
  • Replaces isElectrumDisabled access with useSettings() hook
    (consistent with other screens like Confirm.tsx, WalletsList.tsx)

How

  • class extends Component -> functional components with hooks
  • this.state -> useState()
  • componentDidMount -> useEffect()
  • PropTypes -> TypeScript types (via DetailViewStackParamList)
  • BlueCurrentTheme.colors -> useTheme().colors
  • Class inheritance (RBFBumpFee extends CPFP) -> standalone components

Testing

  • npx tsc --noEmit - zero errors in these files
  • No behavior changes - all UI and logic preserved exactly
  • No new dependencies added

@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Author

@theanmolsharma @chaitika PTAL !!

@chaitika

chaitika commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

afaiu, the wallet doesn't plan on supporting rbf and cpfp in near future, these files are inherited code from bluewallet..
better would be to clean up these leftover files and any existing nav entries to these feature?

@NAME-ASHWANIYADAV
NAME-ASHWANIYADAV force-pushed the ref/convert-fee-bump-screens-to-tsx branch from 4d6c7d1 to 5042e9a Compare July 10, 2026 20:19
@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Author

@chaitika Thanks for the feedback! Updated the PR to delete these inherited BlueWallet files and clean up all navigation/state/locale references. hd-segwit-bech32-transaction.ts cleanup will be a follow-up PR

@NAME-ASHWANIYADAV
NAME-ASHWANIYADAV force-pushed the ref/convert-fee-bump-screens-to-tsx branch from 5042e9a to e5553ac Compare July 19, 2026 22:05
@NAME-ASHWANIYADAV

NAME-ASHWANIYADAV commented Jul 19, 2026

Copy link
Copy Markdown
Author

@notTanveer @chaitika @theanmolsharma have a look !!

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.

REF: Convert fee-bump screens (CPFP, RBFBumpFee, RBFCancel) to TypeScript functional components

2 participants