desktop-wallet icon indicating copy to clipboard operation
desktop-wallet copied to clipboard

[wallet/desktop] support revokable mosaic creation

Open inatatsu-tatsuhiro opened this issue 5 months ago • 3 comments

Summary

This PR adds support for the revokable flag when creating mosaics, allowing users to specify whether a mosaic can be revoked after issuance.

Changes

  • ✅ Added revokable checkbox to the mosaic definition form
  • ✅ Added translations for "revokable" in 5 languages (EN, JA, KO, RU, ZH)
  • ✅ Display revokable status in transaction views
  • ✅ Show revokable flag in mosaic table listings
  • ✅ Added description for revokable flag in the mosaic creation page

Implementation Details

  • Updated FormMosaicDefinitionTransaction to include the revokable field
  • Modified MosaicFlags.create() call to pass the revokable parameter as the 4th argument
  • Added table_header_revokable and flags_revokable translation keys
  • Extended ViewMosaicDefinitionTransaction to display revokable status
  • Updated MosaicTableService to include revokable column

Testing

  1. Navigate to Assets → Create Mosaic
  2. Fill in mosaic details
  3. Check/uncheck the "Revokable" checkbox
  4. Create the mosaic and verify the flag is properly set
  5. View the mosaic in the mosaic list and confirm revokable status is displayed

Screenshots

[Add screenshots of the revokable checkbox and table display]

Checklist

  • [x] Self-review completed
  • [] Added translations for all supported languages
    • [x] Mosaic creattion form
    • [] Explanation of mosaic creation
  • [x] Tested mosaic creation with revokable flag enabled/disabled
  • [x] Tests pass locally

Closes #2015

inatatsu-tatsuhiro avatar Aug 07 '25 00:08 inatatsu-tatsuhiro

The description of revokable in mosaic creation is only available in Japanese.

inatatsu-tatsuhiro avatar Aug 07 '25 01:08 inatatsu-tatsuhiro

Codecov Report

:x: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 53.73%. Comparing base (0a5aaaa) to head (5d50216).

Files with missing lines Patch % Lines
...onTransaction/FormMosaicDefinitionTransactionTs.ts 0.00% 2 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2016      +/-   ##
==========================================
- Coverage   53.75%   53.73%   -0.02%     
==========================================
  Files         585      585              
  Lines       14018    14020       +2     
  Branches     2351     2351              
==========================================
- Hits         7535     7534       -1     
- Misses       6433     6436       +3     
  Partials       50       50              
Flag Coverage Δ
wallet-desktop 53.73% <0.00%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ionTransaction/FormMosaicDefinitionTransaction.vue 0.00% <ø> (ø)
...ages/mosaics/CreateMosaicPage/CreateMosaicPage.vue 0.00% <ø> (ø)
...onTransaction/FormMosaicDefinitionTransactionTs.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Aug 07 '25 01:08 codecov-commenter

Great work! Please add a unit test for that.

the file should located here: __tests__/views/forms/FormMosaicDefinitionTransaction.spec.ts

AnthonyLaw avatar Sep 08 '25 19:09 AnthonyLaw