[Cashtab] Support NFT trading
Summary:
Implement NFT trading with ecash-agora
Supporting functions for this diff have been isolated in other diffs. What remains, though, is still a large diff --- because NFT functionality is interdependent (i.e. ability to list NFTs, browse NFTs, and cancel listed NFTs are all imo MVP-critical).
Integration tests have been added to support expected behavior and this diff has been tested.
After landing this diff, additional NFT improvements are high priority:
Paginate quantity of NFTs loaded and displayed less critical with ecash-agora plugin and by-collection organization
- Organize listed NFTs by collection
- Index ABC chronik server for lokad and switch Cashtab back to ABC chronik server
- Minimize XEC required for a listing TX
- Ability to manage utxo in the event only 1 of 2 of the required ad listing txs goes through
- Parse NFT actions in tx history
I do not think we need these in the MVP.
Guide for reviewer
This is one diff, but it can still be reviewed in compartmentalized parts.
- Adding a new "Listed NFTs" screen to App.js (icon, menu option, nav tests)
- Style changes (new input component for NFT list price, modify modal to expand/collapse with transition to confirm NFT actions)
- Functionality of new NFTs screen (manage your listings, browse other listings, cancel listing, buy listing)
- Functionality added to existing Token screen (list your NFT, price input fiat or XEC. Note this function requires two transactions which are executed with one click.
This diff is available for testing at https://cashtab-local-dev.netlify.app/ (make sure version is v2.41.6)
Test Plan: npm test
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack, tobias_ruck
Differential Revision: https://reviews.bitcoinabc.org/D16328