Skip to content

add support for parityUSD extension#176

Open
mr-zwets wants to merge 4 commits intomainfrom
parityusd-extension
Open

add support for parityUSD extension#176
mr-zwets wants to merge 4 commits intomainfrom
parityusd-extension

Conversation

@mr-zwets
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for the ParityUSD extension system to enable dynamic NFT data enrichment. The extension allows loan key NFTs with empty commitments to fetch actual loan state from on-chain "sidecar" UTXOs, enabling proper display of loan details without storing the data directly in the loan key NFT commitment.

Changes:

  • Implements a generic extension system with the first concrete extension for ParityUSD loan state fetching
  • Adds comprehensive test coverage for the extension system, adapter, and end-to-end parsing flows
  • Updates UI components to display extension-fetched data with appropriate labels in English, Spanish, and French

Reviewed changes

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

Show a summary per file
File Description
test/extensions.test.ts Comprehensive test suite covering adapter conversion, extension invocation, fetchLoanState logic, and end-to-end parsing with extensions
src/parsing/extensions/types.ts TypeScript interfaces defining ElectrumClient, ElectrumUtxo, ExtensionHandler, and ExtensionRegistry types
src/parsing/extensions/parityusd.ts Implementation of fetchLoanState extension that retrieves loan data from sidecar UTXOs and transplants it into loan key NFTs
src/parsing/extensions/index.ts Extension registry and orchestration logic for invoking configured extensions on UTXOs before parsing
src/parsing/electrumAdapter.ts Adapter to bridge mainnet-js provider format to ElectrumClient interface expected by extensions
src/stores/store.ts Integration of extension system into parseNftCommitment function, making it async to support extension invocation
src/components/tokenItems/tokenItemNFT.vue Updated to handle async parseNftCommitment and conditionally display extension-specific labels
src/components/tokenItems/nftChild.vue Updated to handle async parseNftCommitment and conditionally display extension-specific labels
src/i18n/locales/en.json Added "extensionNote" translation for English
src/i18n/locales/es.json Added "extensionNote" translation for Spanish
src/i18n/locales/fr.json Added "extensionNote" translation for French

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant