Repository navigation
add mutation to get additional tx details - #213
Conversation
There was a problem hiding this comment.
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
ibexTransactionDetailsFetchthat 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.
|
Feedback:
|
brh28
left a comment
There was a problem hiding this comment.
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.
f22a2f6 to
8977e58
Compare
8977e58 to
0e62de7
Compare
brh28
left a comment
There was a problem hiding this comment.
Overall, looks good. The parsing logic concerns me some, especially given external data from Ibex. It may be nice to:
- Add some unit tests around the parsing logic.
- 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)
|
@brh28 looking for another review here |
brh28
left a comment
There was a problem hiding this comment.
We can remove RawIbexTransaction but otherwise looks good
|
addressed additional comments, ready for approval @brh28 |
* Single source of truth and Consistent naming for TransactionDetails * updated based on feedback in PR * updated based on PR feedback
No description provided.