Skip to content

[wallet/desktop] support revokable mosaic creation#2016

Open
inatatsu-tatsuhiro wants to merge 2 commits intosymbol:devfrom
inatatsu-tatsuhiro:feature/revokable-mosaic-creation
Open

[wallet/desktop] support revokable mosaic creation#2016
inatatsu-tatsuhiro wants to merge 2 commits intosymbol:devfrom
inatatsu-tatsuhiro:feature/revokable-mosaic-creation

Conversation

@inatatsu-tatsuhiro
Copy link
Copy Markdown

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

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

Closes #2015

@inatatsu-tatsuhiro inatatsu-tatsuhiro changed the title [walet/desktop] support revokable mosaic creation [wallet/desktop] support revokable mosaic creation Aug 7, 2025
@inatatsu-tatsuhiro
Copy link
Copy Markdown
Author

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

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
...onTransaction/FormMosaicDefinitionTransactionTs.ts 0.00% 2 Missing ⚠️
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%) ⬇️

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

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

@Wayonb Wayonb requested a review from AnthonyLaw August 26, 2025 15:39
"flags_divisibility": "Determines the number of decimal places to which the mosaic can be divided. The divisibility must be between 0 and 6 (included).",
"flags_duration_permanent": "If set to true, the mosaic will never expire.",
"flags_restrictable": "If set to true, the mosaic owner can configure custom restrictions.",
"flags_revokable": "If set to true...",
Copy link
Copy Markdown
Member

@AnthonyLaw AnthonyLaw Sep 8, 2025

Choose a reason for hiding this comment

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

Suggested change
"flags_revokable": "If set to true...",
"flags_revokable": "If set to true, the mosaic owner can revoke (cancel) the transfer of mosaics.",

"flags_divisibility": "모자이크의 소수점 자리를 지정할 수 있는 값입니다. 가분성은 0에서 6 사이의 정수만 가능합니다.",
"flags_duration_permanent": "만약 값을 true로 설정한다면, 만료일 없이 생성 가능합니다.",
"flags_restrictable": "만약 값을 true로 설정한다면, 모자이크 주인이 제한설정을 변경할 수 있게 됩니다.",
"flags_revokable": "만약 값을 true로 설정한다면...",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"flags_revokable": "만약 값을 true로 설정한다면...",
"flags_revokable": "True인 경우, 모자이크 소유자는 모자이크 전송을 취소할 수 있습니다.",

"resolving_address": "Разрешение адреса {address}...",
"restore_mnemonic": "Восстановить мнемоническую парольную фразу",
"restrictable": "Ограничения",
"revokable": "отмене",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"revokable": "отмене",
"revokable": "Подлежит отмене",

"flags_divisibility": "Определяет количество десятичных знаков, на которое можно разделить мозаику. Делимость должна быть от 0 до 6 (включительно).",
"flags_duration_permanent": "Если установлено значение (true), мозаика никогда не истечет.",
"flags_restrictable": "Если установлено значение (true), владелец мозаики может настраивать пользовательские ограничения.",
"flags_revokable": "Если установлено значение (true)...",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"flags_revokable": "Если установлено значение (true)...",
"flags_revokable": "Если значение установлено в true, владелец мозаики может отозвать (отменить) её передачу.",

"flags_divisibility": "确定可以分割马赛克的小数点位置。可分割性必须在0和6之间",
"flags_duration_permanent": "如果选择,马赛克将永远不会过期",
"flags_restrictable": "如果选择,马赛克创建者可以配置自定义限制",
"flags_revokable": "如果选择...",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"flags_revokable": "如果选择...",
"flags_revokable": "如果选择,赛克拥有者可以撤销马赛克的转移",

@AnthonyLaw
Copy link
Copy Markdown
Member

Great work! Please add a unit test for that.

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

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.

Implementation of revokable mosaic creation function

3 participants