Skip to content

Commit 4201cb2

Browse files
authored
MPT Object Page Revamp (#1264)
## High Level Overview of Change 1. Revamp the MPT Object page * Header has the `General Overview`, `Market Data` and `Settings` sections * Add tables displaying all transactions and transfers involving the MPT * Add a holders table, sorted in descending order by amount 2. Refactor the IOU Token page in order to reuse its components for MPT since both MPT and IOU are tokens. This involves moving reusable components to `src/containers/Token/shared/` and placing IOU specific logic in `src/containers/Token/IOU/` <!-- Please include a summary/list of the changes. If too broad, please consider splitting into multiple PRs. --> ### Context of Change <!-- Please include the context of a change. If a bug fix, when was the bug introduced? What was the behavior? If a new feature, why was this architecture chosen? What were the alternatives? If a refactor, how is this better than the previous implementation? If there is a design document for this feature, please link it here. --> The current XRPL Explorer Multi-Purpose Token (MPT) page provides only on-ledger metadata of MPT tokens, i.e., Token ID, Issuer, Flags. It lacks interesting information such as market and transaction data. This PR revamp the XRPL Explorer MPT Token page to deliver a more organized, performant, and informative experience. The new page will: 1. Present data in an organized format, e.g., General Overview, Market Data, Settings, Transactions/transfers 2. Show relevant transaction and transfer data 3. Maintain fast load times, even for tokens with high data volume ### Type of Change <!-- Please check relevant options, delete irrelevant ones. --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (non-breaking change that only restructures code) - [x] Tests (You added tests for code that already exists, or your new feature included in this PR) - [ ] Documentation Updates - [x] Translation Updates - [ ] Release ### Codebase Modernization <!-- In an effort to modernize the codebase, you should convert the files that you work with to React Hooks and TypeScript, and update tests to use the React Testing Library instead of Enzyme. If this is not possible (e.g. it's too many changes, touching too many files, etc.) please explain why here. --> - [ ] Updated files to React Hooks - [ ] Updated files to TypeScript - [ ] Updated tests to React Testing Library ## Before / After 1. This MPT has metadata that follows the recommended metadata standards. Its metadata was provided using short keys. The new page shows the metadata in long-key format, but the old page shows the short keys. * New: https://testnet.dev.ripplex.io/mpt/00C81C870778A061899843D4E120E4CDF71BE9613D49A3B7 * Old: https://testnet.xrpl.org/mpt/00C81C870778A061899843D4E120E4CDF71BE9613D49A3B7 2. This MPT has metadata that does not follow the recommended metadata standards. * New: https://testnet.dev.ripplex.io/mpt/00C82BB9B57025920E7575FB97A3930619B73F3DFC630C29 * Old: https://testnet.xrpl.org/mpt/00C82BB9B57025920E7575FB97A3930619B73F3DFC630C29 3. This MPT's metadata is a non JSON string * New: https://testnet.dev.ripplex.io/mpt/00C84CF7586BF37DFD607FA80A5A5FB07D8DD3AAEBE5E831 * Old: https://testnet.xrpl.org/mpt/00C84CF7586BF37DFD607FA80A5A5FB07D8DD3AAEBE5E831 4. This MPT doesn't have metadata. * New: https://testnet.dev.ripplex.io/mpt/00C88EE826D4F4C72605258FB1A895A16343C11CADD98B55 * Old: https://testnet.xrpl.org/mpt/00C88EE826D4F4C72605258FB1A895A16343C11CADD98B55 5. This MPT has transfer data * New: https://livenet.dev.ripplex.io/mpt/057D54EE52340A529B506C4B630ADE0EEE8DA51654A41628 * Old: https://livenet.xrpl.org/mpt/057D54EE52340A529B506C4B630ADE0EEE8DA51654A41628 <!-- If just refactoring / back-end changes, this can be just an in-English description of the change at a technical level. If a UI change, screenshots should be included. --> For reference: 1. MPT Token Figma Design: https://www.figma.com/design/ANoKE7Qr7gsNrRDAyjVTkH/Tokens-and-search?node-id=2736-822&t=0GhNSGgvtMrCWYTy-0 2. RLUSD Token Page: https://livenet.xrpl.org/token/524C555344000000000000000000000000000000.rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De ## Test Plan <!-- Please describe the tests that you ran to verify your changes and provide instructions so that others can reproduce. --> * [Done] Unit Tests * [Done] Manual Tests
1 parent 1b45895 commit 4201cb2

File tree

116 files changed

+4696
-2336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+4696
-2336
lines changed

public/locales/ca-CA/translations.json

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@
349349
"threshold": "llindar",
350350
"consensus": "consens",
351351
"enabled": "activat",
352+
"disabled": null,
352353
"on_tx": "en la (tx)",
353354
"yes": "",
354355
"no": "No",
@@ -707,7 +708,7 @@
707708
"account_page_asset_table_column_lowest_ask": null,
708709
"account_page_asset_table_column_price_usd": null,
709710
"account_page_asset_table_column_share": null,
710-
"account_page_asset_table_column_supply": null,
711+
"account_page_asset_table_column_circulating_supply": null,
711712
"account_page_asset_table_column_ticker": null,
712713
"account_page_asset_table_column_token_id": null,
713714
"account_page_asset_table_column_transfer_fee": null,
@@ -719,13 +720,6 @@
719720
"account_page_asset_table_no_lptoken": null,
720721
"account_page_asset_table_no_mpt": null,
721722
"account_page_asset_table_no_nft": null,
722-
"general_overview": null,
723-
"reputation_level": null,
724-
"market_data": null,
725-
"supply": null,
726-
"circulating_supply": null,
727-
"trades_24h": null,
728-
"amm_tvl": null,
729723
"CredentialAccept": null,
730724
"CredentialCreate": null,
731725
"CredentialDelete": null,
@@ -738,44 +732,49 @@
738732
"txn_sec_description": null,
739733
"load_fee_description": null,
740734
"nUnl_description": null,
735+
"tx_hash": null,
736+
"timestamp": null,
737+
"amount_in": null,
738+
"amount_out": null,
739+
"rate": null,
740+
"refresh_data": null,
741741
"token_page.general_overview": null,
742+
"token_page.market_data": null,
743+
"token_page.all_tx": null,
744+
"token_page.dex_tx": null,
745+
"token_page.transfers_tx": null,
746+
"token_page.holders_table": null,
742747
"token_page.issuer": null,
743748
"token_page.price": null,
744749
"token_page.holders": null,
745-
"token_page.trustlines": null,
746-
"token_page.transfer_fee": null,
747-
"token_page.reputation_level": null,
748-
"token_page.market_data": null,
749750
"token_page.supply": null,
750-
"token_page.circulating_supply": null,
751751
"token_page.market_cap": null,
752752
"token_page.volume_24h": null,
753753
"token_page.trades_24h": null,
754754
"token_page.amm_tvl": null,
755-
"token_page.all_tx": null,
756-
"token_page.dex_tx": null,
757-
"token_page.transfers_tx": null,
758-
"token_page.holders_table": null,
759-
"tx_hash": null,
760-
"timestamp": null,
761-
"amount_in": null,
762-
"amount_out": null,
763-
"rate": null,
755+
"token_page.transfer_fee": null,
764756
"token_page.holders_rank": null,
765757
"token_page.holders_num_tokens": null,
766758
"token_page.holders_percent_supply": null,
767-
"token_page.holders_usd_value": null,
768759
"token_page.holders_no_holders": null,
760+
"token_page.holders_usd_value": null,
761+
"token_page.transfers_data_notice": null,
762+
"token_page.transfers_no_transfers": null,
763+
"token_page.circulating_supply": null,
769764
"token_page.dex_type": null,
770765
"token_page.dex_amount_in_tooltip": null,
771766
"token_page.dex_amount_out_tooltip": null,
772767
"token_page.dex_rate_tooltip": null,
773768
"token_page.dex_data_notice": null,
774769
"token_page.dex_no_trades": null,
775-
"token_page.transfers_data_notice": null,
776-
"token_page.transfers_no_transfers": null,
777770
"token_page.token_label": null,
778771
"token_page.category_text": null,
772+
"token_type.iou": null,
773+
"token_type.mpt": null,
774+
"iou_page.trustlines": null,
775+
"mpt_page.metadata_warning": null,
776+
"copied": null,
777+
"click_to_copy": null,
779778
"delete": null,
780779
"rates": null,
781780
"loan_broker_rates_detail": null,

public/locales/en-US/translations.json

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
"threshold": "threshold",
360360
"consensus": "consensus",
361361
"enabled": "enabled",
362+
"disabled": "disabled",
362363
"on_tx": "on (tx)",
363364
"yes": "Yes",
364365
"no": "No",
@@ -736,7 +737,7 @@
736737
"account_page_asset_table_column_lowest_ask": "Lowest Ask",
737738
"account_page_asset_table_column_price_usd": "Price (USD)",
738739
"account_page_asset_table_column_share": "Share (%)",
739-
"account_page_asset_table_column_supply": "Supply",
740+
"account_page_asset_table_column_circulating_supply": "Circ Supply",
740741
"account_page_asset_table_column_ticker": "Ticker",
741742
"account_page_asset_table_column_token_id": "Token ID",
742743
"account_page_asset_table_column_transfer_fee": "Transfer Fee",
@@ -748,52 +749,49 @@
748749
"account_page_asset_table_no_lptoken": "No LP Tokens found",
749750
"account_page_asset_table_no_mpt": "No MPTs found",
750751
"account_page_asset_table_no_nft": "No NFTs found",
751-
"general_overview": "General Overview",
752-
"reputation_level": "Reputation Level",
753-
"market_data": "Market Data",
754-
"supply": "Supply",
755-
"circulating_supply": "Circulating Supply",
756-
"trades_24h": "Trades (24H)",
757-
"amm_tvl": "AMM TVL",
752+
"tx_hash": "Tx Hash",
753+
"timestamp": "Timestamp (UTC)",
754+
"amount_in": "Amount In",
755+
"amount_out": "Amount Out",
756+
"rate": "Rate",
757+
"refresh_data": "Refresh data",
758758
"token_page.general_overview": "General Overview",
759+
"token_page.market_data": "Market Data",
760+
"token_page.all_tx": "All Token Transactions",
761+
"token_page.dex_tx": "DEX Trades",
762+
"token_page.transfers_tx": "Transfers",
763+
"token_page.holders_table": "Holders",
759764
"token_page.issuer": "Issuer",
760765
"token_page.price": "Price",
761766
"token_page.holders": "# of Holders",
762-
"token_page.trustlines": "# of Trustlines",
763-
"token_page.transfer_fee": "Transfer Fee",
764-
"token_page.reputation_level": "Reputation Level",
765-
"token_page.market_data": "Market Data",
766767
"token_page.supply": "Supply",
767-
"token_page.circulating_supply": "Circ Supply",
768768
"token_page.market_cap": "Market Cap",
769769
"token_page.volume_24h": "Traded Volume (24H)",
770770
"token_page.trades_24h": "# of Trades (24H)",
771771
"token_page.amm_tvl": "AMM TVL",
772-
"token_page.all_tx": "All Token Transactions",
773-
"token_page.dex_tx": "DEX Trades",
774-
"token_page.transfers_tx": "Transfers",
775-
"token_page.holders_table": "Holders",
776-
"tx_hash" : "Tx Hash",
777-
"timestamp" : "Timestamp (UTC)",
778-
"amount_in" : "Amount In",
779-
"amount_out" : "Amount Out",
780-
"rate" : "Rate",
772+
"token_page.transfer_fee": "Transfer Fee",
781773
"token_page.holders_rank": "Rank",
782774
"token_page.holders_num_tokens": "# of Tokens",
783775
"token_page.holders_percent_supply": "% of Supply",
784-
"token_page.holders_usd_value": "USD Value",
785776
"token_page.holders_no_holders": "No holders found",
777+
"token_page.holders_usd_value": "USD Value",
778+
"token_page.transfers_data_notice": "Data displayed is from 7/1/2025, 12:00:00 AM UTC onwards",
779+
"token_page.transfers_no_transfers": "No transfers found",
780+
"token_page.circulating_supply": "Circ Supply",
786781
"token_page.dex_type": "Type",
787782
"token_page.dex_amount_in_tooltip": "The amount of tokens sent by the \"FROM\" account in the trade",
788783
"token_page.dex_amount_out_tooltip": "The amount of tokens sent out by the \"To\" account in the trade",
789784
"token_page.dex_rate_tooltip": "Amount Out / Amount In",
790785
"token_page.dex_data_notice": "Data displayed is from 7/1/2025, 12:00:00 AM UTC onwards",
791786
"token_page.dex_no_trades": "No dex trades found",
792-
"token_page.transfers_data_notice": "Data displayed is from 7/1/2025, 12:00:00 AM UTC onwards",
793-
"token_page.transfers_no_transfers": "No transfers found",
794787
"token_page.token_label": "Token",
795788
"token_page.category_text": "IOU",
796-
"refresh_data": "Refresh data",
789+
"token_type.iou": "IOU",
790+
"token_type.mpt": "MPT",
791+
"iou_page.trustlines": "# of Trustlines",
792+
"mpt_page.metadata_warning": "This MPT does not have metadata, or its metadata does not follow the <a>recommended metadata standards</a>. As a result, general overview and market data will be limited.",
793+
"copied": "Copied",
794+
"click_to_copy": "Click to copy",
797795
"withdraw": "withdraw",
798796
"delete": "delete",
799797
"rates": "rates",

public/locales/es-ES/translations.json

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
"threshold": null,
346346
"consensus": null,
347347
"enabled": null,
348+
"disabled": null,
348349
"on_tx": null,
349350
"yes": null,
350351
"no": null,
@@ -708,7 +709,7 @@
708709
"account_page_asset_table_column_lowest_ask": null,
709710
"account_page_asset_table_column_price_usd": null,
710711
"account_page_asset_table_column_share": null,
711-
"account_page_asset_table_column_supply": null,
712+
"account_page_asset_table_column_circulating_supply": null,
712713
"account_page_asset_table_column_ticker": null,
713714
"account_page_asset_table_column_token_id": null,
714715
"account_page_asset_table_column_transfer_fee": null,
@@ -720,58 +721,56 @@
720721
"account_page_asset_table_no_lptoken": null,
721722
"account_page_asset_table_no_mpt": null,
722723
"account_page_asset_table_no_nft": null,
723-
"general_overview": null,
724-
"reputation_level": null,
725-
"market_data": null,
726-
"supply": null,
727-
"circulating_supply": null,
728-
"trades_24h": null,
729-
"amm_tvl": null,
730724
"CredentialAccept": null,
731725
"CredentialCreate": null,
732726
"CredentialDelete": null,
733727
"DIDDelete": null,
734728
"DIDSet": null,
735729
"account_delegates_to": null,
736730
"delegate_to": null,
731+
"tx_hash": null,
732+
"timestamp": null,
733+
"amount_in": null,
734+
"amount_out": null,
735+
"rate": null,
736+
"refresh_data": null,
737737
"token_page.general_overview": null,
738+
"token_page.market_data": null,
739+
"token_page.all_tx": null,
740+
"token_page.dex_tx": null,
741+
"token_page.transfers_tx": null,
742+
"token_page.holders_table": null,
738743
"token_page.issuer": null,
739744
"token_page.price": null,
740745
"token_page.holders": null,
741-
"token_page.trustlines": null,
742-
"token_page.transfer_fee": null,
743-
"token_page.reputation_level": null,
744-
"token_page.market_data": null,
745746
"token_page.supply": null,
746-
"token_page.circulating_supply": null,
747747
"token_page.market_cap": null,
748748
"token_page.volume_24h": null,
749749
"token_page.trades_24h": null,
750750
"token_page.amm_tvl": null,
751-
"token_page.all_tx": null,
752-
"token_page.dex_tx": null,
753-
"token_page.transfers_tx": null,
754-
"token_page.holders_table": null,
755-
"tx_hash": null,
756-
"timestamp": null,
757-
"amount_in": null,
758-
"amount_out": null,
759-
"rate": null,
751+
"token_page.transfer_fee": null,
760752
"token_page.holders_rank": null,
761753
"token_page.holders_num_tokens": null,
762754
"token_page.holders_percent_supply": null,
763-
"token_page.holders_usd_value": null,
764755
"token_page.holders_no_holders": null,
756+
"token_page.holders_usd_value": null,
757+
"token_page.transfers_data_notice": null,
758+
"token_page.transfers_no_transfers": null,
759+
"token_page.circulating_supply": null,
765760
"token_page.dex_type": null,
766761
"token_page.dex_amount_in_tooltip": null,
767762
"token_page.dex_amount_out_tooltip": null,
768763
"token_page.dex_rate_tooltip": null,
769764
"token_page.dex_data_notice": null,
770765
"token_page.dex_no_trades": null,
771-
"token_page.transfers_data_notice": null,
772-
"token_page.transfers_no_transfers": null,
773766
"token_page.token_label": null,
774767
"token_page.category_text": null,
768+
"token_type.iou": null,
769+
"token_type.mpt": null,
770+
"iou_page.trustlines": null,
771+
"mpt_page.metadata_warning": null,
772+
"copied": null,
773+
"click_to_copy": null,
775774
"delete": null,
776775
"rates": null,
777776
"loan_broker_rates_detail": null,

public/locales/fr-FR/translations.json

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@
347347
"threshold": null,
348348
"consensus": null,
349349
"enabled": null,
350+
"disabled": null,
350351
"on_tx": null,
351352
"yes": null,
352353
"no": null,
@@ -711,7 +712,7 @@
711712
"account_page_asset_table_column_lowest_ask": null,
712713
"account_page_asset_table_column_price_usd": null,
713714
"account_page_asset_table_column_share": null,
714-
"account_page_asset_table_column_supply": null,
715+
"account_page_asset_table_column_circulating_supply": null,
715716
"account_page_asset_table_column_ticker": null,
716717
"account_page_asset_table_column_token_id": null,
717718
"account_page_asset_table_column_transfer_fee": null,
@@ -723,56 +724,54 @@
723724
"account_page_asset_table_no_lptoken": null,
724725
"account_page_asset_table_no_mpt": null,
725726
"account_page_asset_table_no_nft": null,
726-
"general_overview": null,
727-
"reputation_level": null,
728-
"market_data": null,
729-
"supply": null,
730-
"circulating_supply": null,
731-
"trades_24h": null,
732-
"amm_tvl": null,
733727
"CredentialAccept": null,
734728
"CredentialCreate": null,
735729
"CredentialDelete": null,
736730
"DIDDelete": null,
737731
"DIDSet": null,
732+
"tx_hash": null,
733+
"timestamp": null,
734+
"amount_in": null,
735+
"amount_out": null,
736+
"rate": null,
737+
"refresh_data": null,
738738
"token_page.general_overview": null,
739+
"token_page.market_data": null,
740+
"token_page.all_tx": null,
741+
"token_page.dex_tx": null,
742+
"token_page.transfers_tx": null,
743+
"token_page.holders_table": null,
739744
"token_page.issuer": null,
740745
"token_page.price": null,
741746
"token_page.holders": null,
742-
"token_page.trustlines": null,
743-
"token_page.transfer_fee": null,
744-
"token_page.reputation_level": null,
745-
"token_page.market_data": null,
746747
"token_page.supply": null,
747-
"token_page.circulating_supply": null,
748748
"token_page.market_cap": null,
749749
"token_page.volume_24h": null,
750750
"token_page.trades_24h": null,
751751
"token_page.amm_tvl": null,
752-
"token_page.all_tx": null,
753-
"token_page.dex_tx": null,
754-
"token_page.transfers_tx": null,
755-
"token_page.holders_table": null,
756-
"tx_hash": null,
757-
"timestamp": null,
758-
"amount_in": null,
759-
"amount_out": null,
760-
"rate": null,
752+
"token_page.transfer_fee": null,
761753
"token_page.holders_rank": null,
762754
"token_page.holders_num_tokens": null,
763755
"token_page.holders_percent_supply": null,
764-
"token_page.holders_usd_value": null,
765756
"token_page.holders_no_holders": null,
757+
"token_page.holders_usd_value": null,
758+
"token_page.transfers_data_notice": null,
759+
"token_page.transfers_no_transfers": null,
760+
"token_page.circulating_supply": null,
766761
"token_page.dex_type": null,
767762
"token_page.dex_amount_in_tooltip": null,
768763
"token_page.dex_amount_out_tooltip": null,
769764
"token_page.dex_rate_tooltip": null,
770765
"token_page.dex_data_notice": null,
771766
"token_page.dex_no_trades": null,
772-
"token_page.transfers_data_notice": null,
773-
"token_page.transfers_no_transfers": null,
774767
"token_page.token_label": null,
775768
"token_page.category_text": null,
769+
"token_type.iou": null,
770+
"token_type.mpt": null,
771+
"iou_page.trustlines": null,
772+
"mpt_page.metadata_warning": null,
773+
"copied": null,
774+
"click_to_copy": null,
776775
"delete": null,
777776
"rates": null,
778777
"loan_broker_rates_detail": null,

0 commit comments

Comments
 (0)