fix: Nft mutable flag#1329
Open
joshuahamsa wants to merge 3 commits into
Open
Conversation
Map 0x00000010 to tfMutable so the NFTokenMint Detailed tab labels the flag instead of rendering it as raw hex.
Add unit tests for buildFlags decoding NFTokenMint type-specific flags, including the new tfMutable (0x00000010) mapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Adds support for the lsfMutable flag on NFTs so that an NFT's Mutable setting is surfaced in the explorer UI.
Maps the 0x00000010 NFT flag to lsfMutable in src/rippled/lib/utils.ts
Renders a new Mutable row (enabled/disabled) in the NFT Settings table (Settings.tsx)
Adds the mutable translation string (en-US)
Updates the Settings test to expect the additional row
Context of Change
The XLS-46 dynamic NFT (lsfMutable) flag allows an NFT's URI to be modified after minting. The explorer's NFT Settings table decoded lsfBurnable, lsfOnlyXRP, and lsfTransferable, but not lsfMutable, so mutable NFTs gave no indication of their mutability in the UI. This change decodes the flag and displays it alongside the other settings, matching the existing pattern for those flags.
Type of Change
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Refactor (non-breaking change that only restructures code)
Tests (You added tests for code that already exists, or your new feature included in this PR)
Documentation Updates
Translation Updates
Release
Codebase Modernization
[x ] Updated files to React Hooks
[x ] Updated files to TypeScript
Before / After
NFT page → Settings
Before: Showed Burnable, Only XRP, Transferable only. Mutable NFTs gave no indication of mutability.
After: Adds a Mutable row showing enabled/disabled.
NFTokenMint → Detailed tab
Before: Flags displayed
0x00000010as raw, unlabeled hex alongside tfTransferable, tfBurnable.After: Displays
tfMutablefor that bit.Test Plan
Updated Settings.test.js to expect 4 rows with the correct enabled/disabled counts; ran the affected unit suites (Settings + NFTokenMint) — all green.
Manually verified on testnet (Clio) with a minted dynamic NFT:
NFT page Settings shows Mutable: enabled; a non-mutable NFT shows Mutable: disabled.
NFTokenMint Detailed tab labels the flag as
tfMutable.