rooch
rooch copied to clipboard
commands/rpc: display metadata should not carry type in url/name etc
Rooch version
master
What did you do?
call get_decoded_states_with_display with display
let display = rooch
.get_decoded_states_with_display(AccessPath::object(
ObjectID::from_hex_literal(&token.object_id)?,
))
.await?;
{
"id": "0xf34cf2f44b55d256c8912c4d0adba09eedff01eaa639e78e8acdcd5a9cffb3ca",
"owner": "rooch1rvu52sxxw5dfyw8uvugugxfmyyv0t03hyaxzrqc7yhhzwp6j76xq05sqy7",
"owner_bitcoin_address": "bcrt1p964dpq5hsdeesx0cwrk22prd7zs4xml0sjyxw33460lppmkrygdq2whrmy",
"flag": 0,
"state_root": "0x5350415253455f4d45524b4c455f504c414345484f4c4445525f484153480000",
"size": "0",
"created_at": "1746934812334",
"updated_at": "1746934812334",
"object_type": "0x1b394540c6751a9238fc6711c4193b2118f5be37274c21831e25ee270752f68c::gold_ore::GoldOre",
"value": "0x01",
"decoded_value": {
"abilities": 12,
"type": "0x1b394540c6751a9238fc6711c4193b2118f5be37274c21831e25ee270752f68c::gold_ore::GoldOre",
"value": {
"rarity": 1
}
},
"tx_order": "836",
"state_index": "11",
"display_fields": {
"fields": {
"description": "A mystical ore that boosts gold mining efficiency",
"image_url": "https://app.goldminer.life/nft/gold_ore_1u8.png",
"name": "Gold Ore 1u8"
}
}
}
What did you see happen?
"image_url": "https://app.goldminer.life/nft/gold_ore_1u8.png" "name": "Gold Ore 1u8"
The mix params in display should not carry type.
Gold Ore 1 https://app.goldminer.life/nft/gold_ore_1.png
What did you expect to see?
"image_url": "https://app.goldminer.life/nft/gold_ore_1.png" "name": "Gold Ore 1"