[wallet/symbol/mobile] feat: add mosaic management screens and module - #2377
[wallet/symbol/mobile] feat: add mosaic management screens and module#2377OlegMakarenko wants to merge 19 commits into
Conversation
…ion, move copy text to localization, refactor and restructure
…Service and TokenModule
e77a875 to
35386c8
Compare
…tions for current account
|
@OlegMakarenko Here are my findings. Let me know if you'd like me to create separate issues for any of them. Mosaic management — findings
Actual — The mosaic is gone from the list. There is no way to reach its details screen, and therefore no way to use Modify Mosaic or Revoke Mosaic. The creator loses control of the mosaic (mosaic modification and revocation). The question if we want to improve that. ====
Actual - The app crashes. ====
Actual — The information table shows only the ID, chain and creator. Supply and divisibility are omitted; they appear only when the viewing account is the creator. ====
Actual — The account selector is empty with no explanation. Maybe we can add some explanation? ====
Actual — The wallet accepts the value and lets the transaction be sent; the network rejects it. The hardcoded cap does not match the network. The wallet caps supply with MOSAIC_MAX_ATOMIC_UNITS = '9000000000000000' (9 × 10¹⁵) in src/screens/mosaic/constants/index.js:30. Symbol's actual network setting is maxMosaicAtomicUnits = 8999999999000000 — 1,000,000 atomic units lower. At divisibility 6 this means the wallet permits a total supply of up to 9,000,000,000 while the chain caps it at 8,999,999,999, so values in that gap are accepted locally and rejected on-chain at every divisibility level. ==== |
Problem
The Mobile Wallet currently has no support for mosaic (token) management. Users are able to view mosaic/token details, but cannot create new mosaics, modify their supply, or revoke them from holder accounts directly within the app. Any such operations require Desktop Wallet.
Solution
Introduced mosaic management functionality across a new service layer and three new screens:
Added
TokenServiceunderwallet/common/symbol, encapsulating transaction creation for:Added the CreateMosaic screen, including:
Added the RevokeMosaic screen, including:
Added the ModifyMosaic screen, including:
Updated the TokenDetails screen with new buttons to launch RevokeMosaic and ModifyMosaic, conditionally rendered based on mosaic state (e.g. revocable, not expired).
Added CreateMosaic as a new entry point on the Actions screen.