feat(wallet): Add transaction history tab with pending/confirmed views#168
feat(wallet): Add transaction history tab with pending/confirmed views#168bucko13 merged 65 commits intocaravan-bitcoin:mainfrom
Conversation
🦋 Changeset detectedLatest commit: f8ac83d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
bucko13
left a comment
There was a problem hiding this comment.
I haven't been able to test because the client method isn't available, but excited for this change!
I think a lot of my requests for changes are due to you using old code as a reference for this change. Sorry for that confusion with the old code. Hopefully my comments give an idea of the preferred patterns though.
| // Helper function to fetch individual transaction details | ||
| const fetchTransactionDetails = async (client, txid) => { | ||
| try { | ||
| const txDetails = await client.getTransaction(txid); |
There was a problem hiding this comment.
If you built this branch ontop of the #134 changes then we could test this in the vercel deployment
There was a problem hiding this comment.
Thanks for the suggestion ... I have now rebased the current branch to use #134 as base branch
| const [mounted, setMounted] = useState(true); | ||
|
|
||
| // Helper function to fetch individual transaction details | ||
| const fetchTransactionDetails = async (client, txid) => { |
There was a problem hiding this comment.
you can also just use getBlockchainClient directly in the function since it's in the scope already rather than pass it around. Not a huge deal though, this is fine too if you prefer.
There was a problem hiding this comment.
tsx for all new components please.
| ); | ||
| } | ||
|
|
||
| TransactionsTab.propTypes = { |
There was a problem hiding this comment.
Let's use typescript instead of proptypes .
| setTransactions, | ||
| setTransactionsLoading, | ||
| setTransactionsError, | ||
| }; |
There was a problem hiding this comment.
even if you do use redux you should be able to use the newer hook pattern to dispatch actions and get props from the store: useDispatch and useSelector. Take a look at the WalletDescriptorImporter component for an example of how "modern" components should be written with newer patterns (I know it's hard in caravan because of all the legacy code still. sorry about that)
| : []; | ||
|
|
||
| // Render the transaction table | ||
| const renderTransactionTable = (txs) => ( |
There was a problem hiding this comment.
This is a pattern from our legacy code that we'd really like to move away from. It's kind of an anti-pattern for react. This should just be a component <TransactionTable txs={txs} />. This way you get react rendering optimizations, type safety, and a cleaner parent component because you can pull this out as a standalone component.
There was a problem hiding this comment.
is there a reason this needs to be in redux? Are there any other components that need to use this outside of the component tree you've added? If you need to pass this data down through multiple children, you can also use context instead of redux. You'll still have access to what you need from the store use useSelector or useDispatch as needed. If we can avoid adding to our redux code that's preferable (when possible).
There was a problem hiding this comment.
Ahh ... yes I realise it now ... maybe I over-thought of having the use of redux for passing the states onto the CPFP/RBF components ... but now that you have mentioned that you'd refer not to use redux and rely on modern react practices... I revert back to the version I wrote without the use of redux :)
This commit adds a getTransaction method to the BlockchainClient class, which provides a consistent structure for fetching transaction details across different data providers (Bitcoin Core, Blockstream, Mempool). Changes: - Add `TransactionDetails` interface for unified transaction data - Implement `getTransaction` method - Add `normalizeTransactionData` to standardize response
Introduce a new Transactions tab to the wallet interface, allowing users to view and filter their transaction history by confirmation status (pending or confirmed). - Added transaction state management in Redux - Implemented filtering functionality for pending and confirmed transactions - Added logic to fetch detailed transaction data - Included test coverage for new Redux actions and reducers This enhancement improves the wallet's usability by providing users with better visibility into transaction statuses, including key details such as fee rate, amount sent, and blocks confirmed.
69f9c02 to
bd87882
Compare
|
FYI: we'll need a changeset for the coordinator as well. |
- Moved transaction table logic to a separate `TransactionTable.tsx` component - Implemented sortable table columns for better UX - Handled missing `tx.fee` values to prevent crashes - Displayed timestamps in "time ago" format using `date-fns` - Added option to toggle between Block Explorer and self-hosted node for transaction links - Improved code readability and performance by removing inline render functions
…or the getTransaction method
WalkthroughThis update introduces a new transaction retrieval method in the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant WC as WalletControl
participant TT as TransactionsTab
participant BC as BlockchainClient
participant B as bitcoind.ts
U->>WC: Select "Transactions" tab
WC->>TT: Render TransactionsTab component
TT->>BC: Call fetchTransactions() → getTransaction(txid)
BC->>B: Make RPC call for raw transaction data
B-->>BC: Return raw transaction data
BC->>BC: Normalize transaction data
BC-->>TT: Return TransactionDetails
TT->>U: Display updated transactions
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
apps/coordinator/src/components/Wallet/TransactionsTab.tsxOops! Something went wrong! :( ESLint: 7.32.0 ESLint couldn't find the plugin "eslint-plugin-testing-library". (The package "eslint-plugin-testing-library" was not found when loaded as a Node module from the directory "/apps/coordinator".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-testing-library" was referenced from the config file in "apps/coordinator/.eslintrc.cjs » @caravan/eslint-config/app.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. apps/coordinator/src/actions/transactionActions.jsOops! Something went wrong! :( ESLint: 7.32.0 ESLint couldn't find the plugin "eslint-plugin-testing-library". (The package "eslint-plugin-testing-library" was not found when loaded as a Node module from the directory "/apps/coordinator".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-testing-library" was referenced from the config file in "apps/coordinator/.eslintrc.cjs » @caravan/eslint-config/app.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. apps/coordinator/src/actions/walletActions.jsOops! Something went wrong! :( ESLint: 7.32.0 ESLint couldn't find the plugin "eslint-plugin-testing-library". (The package "eslint-plugin-testing-library" was not found when loaded as a Node module from the directory "/apps/coordinator".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-testing-library" was referenced from the config file in "apps/coordinator/.eslintrc.cjs » @caravan/eslint-config/app.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…flat files to a structured directory with separated concerns, seperated hooks, types and UI logic
apps/coordinator/src/components/Wallet/TransactionsTab/hooks.ts
Outdated
Show resolved
Hide resolved
bucko13
left a comment
There was a problem hiding this comment.
just a couple nits but a really nice cleanup!
apps/coordinator/src/components/Wallet/TransactionsTab/TransactionsTable.tsx
Outdated
Show resolved
Hide resolved
…by the client package for the private note, the "fees" column has been dropped
|
I checked the latest vercel preview, and it looks good to me as a starting point to build on. Happy to see this merged. |
… and spent UTXO transactions
…in this implementation due to unspent UTXO tracking difficulty for private nodes
…component remount
| }); | ||
| } else if (node.addressUsed) { | ||
| // Address has been used but has no UTXOs (spent) | ||
| addressesWithSpentUTXOs.add(node.multisig.address); |
There was a problem hiding this comment.
curious why this was necessary?
* fix: multisig support for indirect keystore interactions (#120) * Version Packages (#121) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Caravan Health Package (beta) (#112) Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com> Co-authored-by: buck <buck@unchained.com> * Version Packages (#123) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Tweaks to SegWit PSBT Inputs/Outputs (#124) * fix: supply witness script when generating multisig * fix: include non witness utxo in segwit inputs * fix: add unsignedPSBT to state on finalizeOutputs * fix: variable names and pass psbt to direct sig importer * update fixture shape and psbts to include non witness utxos * tweak fixture shape and add non witness utxos to psbts * hackish injection of non witness utxos for tests * include nonwitness utxo for segwit in caravan bitcoin; update base64 encoded psbts in fixtures for less testing hackery * include multisig obj in caravan bitcoin fixtures --------- Co-authored-by: buck <buck@unchained.com> * Feat: bip32 package with blinded xpub support (#126) * cleanup and fix generator templates * init bip32 package with paths utils * fix: eslint and add import ordering * split up key and path modules and add tests * custom util for getting random ints in node or browser * use custom random int for blinded paths * util for getting blinded xpub from source * feat: blind xpub support for text input * make new bip32 package publishable * feat: reused functionality extracted to a utility for getting relative child sequence * Fix hermit selection (#127) * convert HermitReader and SignatureImporter to typescript * adding height on hermit reader * convert HermitReader to functional and use new QrReader api * fix falsey bug * styling cleanup --------- Co-authored-by: Justin Moore <11jmoore@pm.me> * caravan/bip32 publish access public (#129) * tweak to package.json (#130) * Version Packages (#128) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * unsignedPsbt in redux store should include global xpubs (#132) * bump for coordinator (#138) * Version Packages (#139) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fee bumping Package (#114) * feat: Initialize @caravan/feebumping package Create a new package for fee bumping functionality in Caravan. This package provides modular and reusable utilities for implementing RBF (Replace-By-Fee) and CPFP (Child-Pays-For-Parent) fee bumping strategies. Key additions: - Basic package structure and configuration files - Core modules for RBF and CPFP implementations - Fee estimation utilities - Type definitions for fee bumping operations - Constants and utility functions This package aims to enhance Caravan's transaction management capabilities by providing a flexible and extensible fee bumping solution that can be easily integrated into the Caravan coordinator wallet and other Bitcoin projects. * update package-lock (#143) * Version Packages (#144) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add support for the BitBox02 hardware wallet (#117) * add support for the BitBox02 hardware wallet Using the `bitbox-api` NPM package, which loads a WASM module. Note about CJS: Currently the `bitbox-api` package is an ESM package with a `module: ...` entrypoint, so it is not compatible with the `cjs` target of caravan-wallets. The only workaround that I could find where compilation succeeds and the package works in the browser is to mark bitbox-api as external in tsup.config.ts. Note about signing tests: - The BitBox02 requires the previous transaction of each input to be present in the PSBT (`PSBT_IN_NON_WITNESS_UTXO`), so it can verify the input amount and avoid fee attacks. The signing test fixtures are missing these, so they fail. - The BitBox02 uses the anti-klepto (anti-exfil) protocol to mitigate covert nonce exfil attacks. This results in random signatures. The unit test fixtures hardcode the expected signatures, assuming they are always the same. As a result, also here the tests fail. To fix this, the tests should rather verify the ECDSA signatures against the transaction sighash for each input. * hide BitBox02 menu item for P2SH BitBox02 does not support legacy P2SH. * bitbox: display pairing code The BitBox, if not paired yet, will show a pairing code for confirmation. This can happen in any BitBox interaction. This commit adds a `showPairingCode` param to all BitBox interactions. If not provided, a default implementation is used which shows the pairing code in a browser popup. The current `messages()` system is not a good fit, as the client does not know when to call `messagesFor()` to display it. Having a separate UI button to pair the BitBox is not good UX (why should the user be bothered to click a "pair" button first? What if the user doesn't) and also fragile (a re-pairing could be needed at any time). * add regtest support for BitBox02 --------- Co-authored-by: buck <buck@unchained.com> * Version Packages (#145) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: fees package private (#146) * Translate segwit psbt (#147) * chore: fix turbo.json for test runner * update deps * feat: dds support for translatePSBT for segwit PSBTs * pass key details to sig interaction just in case * Version Packages (#148) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: move bitbox to normal dependency (#149) * Version Packages (#150) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(wallets): bundle internal dependencies with production bundle (#151) * Version Packages (#152) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: @caravan/bitcoin shouldn't be noExternal (#153) * Version Packages (#154) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: unknown network error for regtest (#156) * support regtest network in coldcard and custom interactions * add changeset * Version Packages (#157) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * include addressType for valid PSBT translation in SignMultisigTransaction (#159) * Version Packages (#160) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(deps-dev): bump gh-pages from 3.2.3 to 5.0.0 Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 3.2.3 to 5.0.0. - [Release notes](https://github.com/tschaub/gh-pages/releases) - [Changelog](https://github.com/tschaub/gh-pages/blob/main/changelog.md) - [Commits](tschaub/gh-pages@v3.2.3...v5.0.0) --- updated-dependencies: - dependency-name: gh-pages dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * fix: turbo dev depends on build w/ esbuild noExternal (#164) * Add sparrow to allowed method of importing pubkeys (#166) Signed-off-by: Harshil Jani <harshiljani2002@gmail.com> * bump @trezor/connect-web from 9.1.12 to 9.4.7 (#163) Co-authored-by: dylan-thompson <141655089+dylan-thompson@users.noreply.github.com> * Version Packages (#169) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(deps): bump axios from 1.6.7 to 1.7.4 in /packages/caravan-wallets Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.7...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * PsbtV2.toV0(): Convert a PsbtV2 class to its serialized PSBTv0 counterpart (#158) * feat: PsbtV2.toV0() * chore: changeset * fix: remove log * test: add more tests for PsbtV2.toV0 * chore: update package-lock to match package.json (#171) * Version Packages (#173) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: replace npm install with npm ci in CI workflows (#175) * fix(psbt): lock dependency of caravan-bitcoin (#174) * Version Packages * chore(deps): bump axios from 1.6.7 to 1.7.4 Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.7...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump vite from 4.5.5 to 4.5.6 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.5 to 4.5.6. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v4.5.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v4.5.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * chore(turbo): add build as lint task dependency (#178) * chore(wallets): bump trezor connect dependency (#183) * Version Packages (#184) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix/docker updates (#185) * fix(docker): add multi-platform support for coordinator Dockerfile * chore(changeset): changeset for multi-platform Dockerfile change * docs(dockerfile): clarify platform-agnostic comment for coordinator app * feat: Add getTransaction method to BlockchainClient (#134) * feat: Add getTransaction method to BlockchainClient This commit adds a getTransaction method to the BlockchainClient class, which provides a consistent structure for fetching transaction details across different data providers (Bitcoin Core, Blockstream, Mempool). Changes: - Add `TransactionDetails` interface for unified transaction data - Implement `getTransaction` method - Add `normalizeTransactionData` to standardize response * REVIEW-CHANGES : changes in bitcoind.js and tests * refactor: move transaction normalization to standalone utility * refactor: update TransactionDetails to use camelCase naming * refactor(bitcoind): convert bitcoind.js to TypeScript * feat(bitcoind): update ListTransactionsItem interface to match RPC spec * fix(client): handle different transaction response formats properly for the getTransaction method * fix: update test mocks to match RPC response types * changes to fix broken tests * refactor(block-explorer): Convert to TypeScript with improved type safety * refactor(blockchain): Migrate to TypeScript and enhance error handling * revert: revert: undo recent changes to bitcoind.ts * fixes: Type fixes in bitcoind * fix: remove async promise executor in callBitcoind * doc-strings: added doc strings to callBitcoind method * refactor: add TypeScript type annotations to bitcoindParams function * Added detailed docstrings to the `bitcoindListUnspent` method * Added detailed docstrings to the `bitcoindGetAddressStatus` method * Added detailed docstrings to the `bitcoindEstimateSmartFee` method * refactor: improve typing and error handling in bitcoindSendRawTransaction * refactor: improve typing and added doc-strings in bitcoindRawTxData * revert: undo recent changes to block_explorer.ts * fixes-types: Partial type fixes in block_explorer.ts to pass type errors * fixes-type-block_explorer: Fixed blockExplorerGetAddresesUTXOs function * fixes-type-block_explorer: Fixed blockExplorerGetAddressStatus function * fixes-type-block_explorer: Fixed blockExplorerGetFeeEstimate function * fixes-type-block_explorer: Fixed blockExplorerBroadcastTransaction function * revert: undo recent changes to blockchain.ts * fixes-types: Partial type fixes in blockchain.ts to pass type errors * fixes-type-blockchain: Fixed fetchAddressUTXOsUnsorted function * fixes-type-blockchain: Fixed fetchAddressUTXOs function * fixes-type-blockchain: Fixed getAddressStatus function * fixes-type-blockchain: Fixed fetchFeeEstimate function * fixes-type-blockchain: Fixed broadcastTransaction function * TO-DO: any error eslint disable to-do * chore(changeset): Update changeset to include TypeScript migration * refactor(bitcoind): standardize Bitcoin RPC parameters by introducing `BaseBitcoindArgs`, updating function signatures * refactor(bitcoind): `bitcoindRawTxData` to use standardize Bitcoin RPC function parameters * chore: rename block_explorer.ts to blockExplorer.ts for consistency --------- Co-authored-by: buck <buck@unchained.com> * Version Packages (#186) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Allow a PsbtV2 to be constructed with a psbtv2 which has been forceably set to have PSBT_GLOBAL_TX_VERSION === 1 (#188) * feat: allowTxnVersion1 on instantiation * chore: changeset * Version Packages (#189) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: fixed the private node rpc calls bug in clients `getTransaction` method (#196) * Version Packages (#197) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(wallet): Add pending transaction tab (#168) * fix: workflow failure fixes * fix: tests failures fixed --------- Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Harshil Jani <harshiljani2002@gmail.com> Co-authored-by: chadchapnick <143517546+chadchapnick@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Harshil Jani <harshiljani2002@gmail.com> Co-authored-by: buck <buck@unchained.com> Co-authored-by: Justin Moore <11jmoore@pm.me> Co-authored-by: Mrigesh Thakur <96632943+Legend101Zz@users.noreply.github.com> Co-authored-by: benma <m@mben.ch> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Shuford <75178461+robertshuford@users.noreply.github.com> Co-authored-by: kimlwh <kimlwh@proton.me> Co-authored-by: dylan-thompson <141655089+dylan-thompson@users.noreply.github.com> Co-authored-by: Jack D <shadouts@hotmail.com>
* fix: multisig support for indirect keystore interactions (#120) * Version Packages (#121) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Caravan Health Package (beta) (#112) Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com> Co-authored-by: buck <buck@unchained.com> * Version Packages (#123) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Tweaks to SegWit PSBT Inputs/Outputs (#124) * fix: supply witness script when generating multisig * fix: include non witness utxo in segwit inputs * fix: add unsignedPSBT to state on finalizeOutputs * fix: variable names and pass psbt to direct sig importer * update fixture shape and psbts to include non witness utxos * tweak fixture shape and add non witness utxos to psbts * hackish injection of non witness utxos for tests * include nonwitness utxo for segwit in caravan bitcoin; update base64 encoded psbts in fixtures for less testing hackery * include multisig obj in caravan bitcoin fixtures --------- Co-authored-by: buck <buck@unchained.com> * Feat: bip32 package with blinded xpub support (#126) * cleanup and fix generator templates * init bip32 package with paths utils * fix: eslint and add import ordering * split up key and path modules and add tests * custom util for getting random ints in node or browser * use custom random int for blinded paths * util for getting blinded xpub from source * feat: blind xpub support for text input * make new bip32 package publishable * feat: reused functionality extracted to a utility for getting relative child sequence * Fix hermit selection (#127) * convert HermitReader and SignatureImporter to typescript * adding height on hermit reader * convert HermitReader to functional and use new QrReader api * fix falsey bug * styling cleanup --------- Co-authored-by: Justin Moore <11jmoore@pm.me> * caravan/bip32 publish access public (#129) * tweak to package.json (#130) * Version Packages (#128) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * unsignedPsbt in redux store should include global xpubs (#132) * bump for coordinator (#138) * Version Packages (#139) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fee bumping Package (#114) * feat: Initialize @caravan/feebumping package Create a new package for fee bumping functionality in Caravan. This package provides modular and reusable utilities for implementing RBF (Replace-By-Fee) and CPFP (Child-Pays-For-Parent) fee bumping strategies. Key additions: - Basic package structure and configuration files - Core modules for RBF and CPFP implementations - Fee estimation utilities - Type definitions for fee bumping operations - Constants and utility functions This package aims to enhance Caravan's transaction management capabilities by providing a flexible and extensible fee bumping solution that can be easily integrated into the Caravan coordinator wallet and other Bitcoin projects. * update package-lock (#143) * Version Packages (#144) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add support for the BitBox02 hardware wallet (#117) * add support for the BitBox02 hardware wallet Using the `bitbox-api` NPM package, which loads a WASM module. Note about CJS: Currently the `bitbox-api` package is an ESM package with a `module: ...` entrypoint, so it is not compatible with the `cjs` target of caravan-wallets. The only workaround that I could find where compilation succeeds and the package works in the browser is to mark bitbox-api as external in tsup.config.ts. Note about signing tests: - The BitBox02 requires the previous transaction of each input to be present in the PSBT (`PSBT_IN_NON_WITNESS_UTXO`), so it can verify the input amount and avoid fee attacks. The signing test fixtures are missing these, so they fail. - The BitBox02 uses the anti-klepto (anti-exfil) protocol to mitigate covert nonce exfil attacks. This results in random signatures. The unit test fixtures hardcode the expected signatures, assuming they are always the same. As a result, also here the tests fail. To fix this, the tests should rather verify the ECDSA signatures against the transaction sighash for each input. * hide BitBox02 menu item for P2SH BitBox02 does not support legacy P2SH. * bitbox: display pairing code The BitBox, if not paired yet, will show a pairing code for confirmation. This can happen in any BitBox interaction. This commit adds a `showPairingCode` param to all BitBox interactions. If not provided, a default implementation is used which shows the pairing code in a browser popup. The current `messages()` system is not a good fit, as the client does not know when to call `messagesFor()` to display it. Having a separate UI button to pair the BitBox is not good UX (why should the user be bothered to click a "pair" button first? What if the user doesn't) and also fragile (a re-pairing could be needed at any time). * add regtest support for BitBox02 --------- Co-authored-by: buck <buck@unchained.com> * Version Packages (#145) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: fees package private (#146) * Translate segwit psbt (#147) * chore: fix turbo.json for test runner * update deps * feat: dds support for translatePSBT for segwit PSBTs * pass key details to sig interaction just in case * Version Packages (#148) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: move bitbox to normal dependency (#149) * Version Packages (#150) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(wallets): bundle internal dependencies with production bundle (#151) * Version Packages (#152) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: @caravan/bitcoin shouldn't be noExternal (#153) * Version Packages (#154) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: unknown network error for regtest (#156) * support regtest network in coldcard and custom interactions * add changeset * Version Packages (#157) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * include addressType for valid PSBT translation in SignMultisigTransaction (#159) * Version Packages (#160) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(deps-dev): bump gh-pages from 3.2.3 to 5.0.0 Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 3.2.3 to 5.0.0. - [Release notes](https://github.com/tschaub/gh-pages/releases) - [Changelog](https://github.com/tschaub/gh-pages/blob/main/changelog.md) - [Commits](tschaub/gh-pages@v3.2.3...v5.0.0) --- updated-dependencies: - dependency-name: gh-pages dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * fix: turbo dev depends on build w/ esbuild noExternal (#164) * Add sparrow to allowed method of importing pubkeys (#166) Signed-off-by: Harshil Jani <harshiljani2002@gmail.com> * bump @trezor/connect-web from 9.1.12 to 9.4.7 (#163) Co-authored-by: dylan-thompson <141655089+dylan-thompson@users.noreply.github.com> * Version Packages (#169) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore(deps): bump axios from 1.6.7 to 1.7.4 in /packages/caravan-wallets Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.7...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * PsbtV2.toV0(): Convert a PsbtV2 class to its serialized PSBTv0 counterpart (#158) * feat: PsbtV2.toV0() * chore: changeset * fix: remove log * test: add more tests for PsbtV2.toV0 * chore: update package-lock to match package.json (#171) * Version Packages (#173) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: replace npm install with npm ci in CI workflows (#175) * fix(psbt): lock dependency of caravan-bitcoin (#174) * Version Packages * chore(deps): bump axios from 1.6.7 to 1.7.4 Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.7...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump vite from 4.5.5 to 4.5.6 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.5 to 4.5.6. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v4.5.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v4.5.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> * chore(turbo): add build as lint task dependency (#178) * chore(wallets): bump trezor connect dependency (#183) * Version Packages (#184) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix/docker updates (#185) * fix(docker): add multi-platform support for coordinator Dockerfile * chore(changeset): changeset for multi-platform Dockerfile change * docs(dockerfile): clarify platform-agnostic comment for coordinator app * feat: Add getTransaction method to BlockchainClient (#134) * feat: Add getTransaction method to BlockchainClient This commit adds a getTransaction method to the BlockchainClient class, which provides a consistent structure for fetching transaction details across different data providers (Bitcoin Core, Blockstream, Mempool). Changes: - Add `TransactionDetails` interface for unified transaction data - Implement `getTransaction` method - Add `normalizeTransactionData` to standardize response * REVIEW-CHANGES : changes in bitcoind.js and tests * refactor: move transaction normalization to standalone utility * refactor: update TransactionDetails to use camelCase naming * refactor(bitcoind): convert bitcoind.js to TypeScript * feat(bitcoind): update ListTransactionsItem interface to match RPC spec * fix(client): handle different transaction response formats properly for the getTransaction method * fix: update test mocks to match RPC response types * changes to fix broken tests * refactor(block-explorer): Convert to TypeScript with improved type safety * refactor(blockchain): Migrate to TypeScript and enhance error handling * revert: revert: undo recent changes to bitcoind.ts * fixes: Type fixes in bitcoind * fix: remove async promise executor in callBitcoind * doc-strings: added doc strings to callBitcoind method * refactor: add TypeScript type annotations to bitcoindParams function * Added detailed docstrings to the `bitcoindListUnspent` method * Added detailed docstrings to the `bitcoindGetAddressStatus` method * Added detailed docstrings to the `bitcoindEstimateSmartFee` method * refactor: improve typing and error handling in bitcoindSendRawTransaction * refactor: improve typing and added doc-strings in bitcoindRawTxData * revert: undo recent changes to block_explorer.ts * fixes-types: Partial type fixes in block_explorer.ts to pass type errors * fixes-type-block_explorer: Fixed blockExplorerGetAddresesUTXOs function * fixes-type-block_explorer: Fixed blockExplorerGetAddressStatus function * fixes-type-block_explorer: Fixed blockExplorerGetFeeEstimate function * fixes-type-block_explorer: Fixed blockExplorerBroadcastTransaction function * revert: undo recent changes to blockchain.ts * fixes-types: Partial type fixes in blockchain.ts to pass type errors * fixes-type-blockchain: Fixed fetchAddressUTXOsUnsorted function * fixes-type-blockchain: Fixed fetchAddressUTXOs function * fixes-type-blockchain: Fixed getAddressStatus function * fixes-type-blockchain: Fixed fetchFeeEstimate function * fixes-type-blockchain: Fixed broadcastTransaction function * TO-DO: any error eslint disable to-do * chore(changeset): Update changeset to include TypeScript migration * refactor(bitcoind): standardize Bitcoin RPC parameters by introducing `BaseBitcoindArgs`, updating function signatures * refactor(bitcoind): `bitcoindRawTxData` to use standardize Bitcoin RPC function parameters * chore: rename block_explorer.ts to blockExplorer.ts for consistency --------- Co-authored-by: buck <buck@unchained.com> * Version Packages (#186) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Allow a PsbtV2 to be constructed with a psbtv2 which has been forceably set to have PSBT_GLOBAL_TX_VERSION === 1 (#188) * feat: allowTxnVersion1 on instantiation * chore: changeset * Version Packages (#189) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: fixed the private node rpc calls bug in clients `getTransaction` method (#196) * Version Packages (#197) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(wallet): Add pending transaction tab (#168) * UI cleanup: Remove redundant header and focus on pending transactions (#205) * UI cleanup: Remove redundant header and focus on pending transactions * added changeset * fix: rm req of PSBT_GLOBAL_FALLBACK_LOCKTIME on isReadyForConstructor (#199) Co-authored-by: buck <buck@unchained.com> * Version Packages (#203) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Feat/add get wallet transaction (#206) * Add-RPC-Call:Added `bitcoindGetWalletTransaction` function for direct RPC access * add-type: WalletTransactionResponse * fix: WalletTransactionResponse as per docs * add-utility-fn: transformWalletTransactionToRawTransactionData added * add-method: Added `getWalletTransaction` method to the BlockchainClient class * tests: added bitcoindGetWalletTransaction tests * tests: added transformWalletTransactionToRawTransactionData tests * test: added getWalletTransaction tests * added changeset * refactor : update getTransaction method * UI(Transaction-Tab): added back the fee-display component * fixes: to handle category(send/receive) of tx * fix:error checking for category details of tx * fix:error checking for category details of tx-2 * test-fix: fixes to handle the new added category type * Version Packages (#217) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: updated readme (#218) * fix for code scanning --------- Signed-off-by: Harshil-Jani <harshiljani2002@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Harshil Jani <harshiljani2002@gmail.com> Co-authored-by: chadchapnick <143517546+chadchapnick@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Harshil Jani <harshiljani2002@gmail.com> Co-authored-by: buck <buck@unchained.com> Co-authored-by: Justin Moore <11jmoore@pm.me> Co-authored-by: Mrigesh Thakur <96632943+Legend101Zz@users.noreply.github.com> Co-authored-by: benma <m@mben.ch> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Shuford <75178461+robertshuford@users.noreply.github.com> Co-authored-by: kimlwh <kimlwh@proton.me> Co-authored-by: dylan-thompson <141655089+dylan-thompson@users.noreply.github.com> Co-authored-by: Jack D <shadouts@hotmail.com> Co-authored-by: Jack D <jack@unchained.com> Co-authored-by: Narasimha <129654598+narasimha-1511@users.noreply.github.com>

Add a new Transactions tab to the wallet interface that provides users with a detailed view of their transaction history. The tab includes:
Features
Technical Changes
Why This Change?
This enhancement improves the wallet's usability by providing users with:
Summary by CodeRabbit