Skip to content

add mutation to get additional tx details - #213

Merged
islandbitcoin merged 3 commits into
mainfrom
feat/tx-details
Oct 31, 2025
Merged

islandbitcoin merged 3 commits into
mainfrom
feat/tx-details

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

No description provided.

@islandbitcoin islandbitcoin self-assigned this Sep 23, 2025
@islandbitcoin islandbitcoin added the enhancement New feature or request label Sep 23, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new GraphQL mutation for fetching additional transaction details from Ibex, extending the API to provide comprehensive transaction information including Lightning and onchain Bitcoin transaction data.

Key changes:

  • New mutation ibexTransactionDetailsFetch that accepts an Ibex transaction ID and returns detailed transaction information
  • Support for both Lightning and onchain Bitcoin transaction fields with dynamic field parsing
  • Integration with blockchain service to calculate confirmations for onchain transactions

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/services/blockchain/index.ts Adds blockchain service for fetching current block height from mempool.space API
src/graphql/public/types/object/ibex-transaction-details.ts Defines GraphQL object type for transaction details with Lightning and onchain fields
src/graphql/public/types/payload/ibex-transaction-details.ts Defines payload wrapper with error handling for transaction details response
src/graphql/public/root/mutation/ibex-transaction-details-fetch.ts Implements the main mutation resolver with complex data parsing logic
src/graphql/public/mutations.ts Registers the new mutation in the mutations export
src/graphql/public/schema.graphql Auto-generated schema updates reflecting the new types and mutation
dev/apollo-federation/supergraph.graphql Auto-generated federation schema updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@islandbitcoin
islandbitcoin requested a review from brh28 September 23, 2025 03:10
@islandbitcoin

Copy link
Copy Markdown
Contributor Author

Feedback:

  • Abstract the name so we don't call it "ibex..." just "transaction-by-id"
  • Convert from mutation to query
  • Make query work for both admin user and regular user, allowing admin to query for all IDs and public only query for ID in domain of user.
  • Aim for as little redundancy as possible (generic function for wallet.getTransactionsById)
  • Look into mapping wallet.getTransactionsById to a type that corresponds to the GraphQL type

@islandbitcoin
islandbitcoin requested a review from brh28 September 25, 2025 21:43

@brh28 brh28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Relatively isolated changes, so not too worried about how the code is written. Main concern would be regarding the schema as having separate Transaction, IbexTransactionDetails and AdminTransactionDetails types doesn't make much sense to me.

@islandbitcoin
islandbitcoin force-pushed the feat/tx-details branch 6 times, most recently from f22a2f6 to 8977e58 Compare October 17, 2025 21:28

@brh28 brh28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall, looks good. The parsing logic concerns me some, especially given external data from Ibex. It may be nice to:

  1. Add some unit tests around the parsing logic.
  2. Make sure errors are being properly thrown and logged to Honeycomb

Otherwise, this is something we'll probably need to address over time (i.e tech debt)

@islandbitcoin

Copy link
Copy Markdown
Contributor Author

@brh28 looking for another review here

@brh28 brh28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can remove RawIbexTransaction but otherwise looks good

@islandbitcoin
islandbitcoin requested a review from brh28 October 28, 2025 14:10
@islandbitcoin

Copy link
Copy Markdown
Contributor Author

addressed additional comments, ready for approval @brh28

@islandbitcoin
islandbitcoin merged commit 201aaf6 into main Oct 31, 2025
heyolaniran pushed a commit to heyolaniran/flash that referenced this pull request Mar 30, 2026
* Single source of truth and Consistent naming for TransactionDetails

* updated based on feedback in PR

* updated based on PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants