diff --git a/web/explorer/explorer-server/src/server.rs b/web/explorer/explorer-server/src/server.rs --- a/web/explorer/explorer-server/src/server.rs +++ b/web/explorer/explorer-server/src/server.rs @@ -421,8 +421,16 @@ }; ( - format!("Token Details ({} Transaction)", &action_str) - .into(), + format!( + "Token Details ({}{} Transaction)", + if token_entry.is_invalid { + "Invalid " + } else { + "" + }, + &action_str, + ) + .into(), action_str.into(), specification.into(), ) diff --git a/web/explorer/explorer-server/src/templating/filters.rs b/web/explorer/explorer-server/src/templating/filters.rs --- a/web/explorer/explorer-server/src/templating/filters.rs +++ b/web/explorer/explorer-server/src/templating/filters.rs @@ -175,6 +175,10 @@ Ok((*value).into()) } +pub fn string_to_i128(value: &String) -> askama::Result { + Ok(value.parse::().unwrap()) +} + pub fn render_token_amount( base_amount: &i128, decimals: &u32, diff --git a/web/explorer/explorer-server/templates/pages/transaction.html b/web/explorer/explorer-server/templates/pages/transaction.html --- a/web/explorer/explorer-server/templates/pages/transaction.html +++ b/web/explorer/explorer-server/templates/pages/transaction.html @@ -191,6 +191,37 @@ {% call token_info_table::render(tx, slp_genesis_info, slp_meta, token_input, token_output, action_str, specification) %} + + {% match slp_meta %}{% when Some with(entry) %}{% match slp_genesis_info + %}{% when Some with(genesis_info) %} {% if entry.is_invalid %} +

Error details

+
+ + + + + + + + + + + + + + + +
Total burnt + {{ + entry.actual_burn_amount|string_to_i128|render_token_amount(genesis_info.decimals)|safe + }} {{ + genesis_info.token_ticker|string_from_lossy_utf8 }} +
Burns mint batons + {% if entry.burns_mint_batons %}Yes{% else %}No{% + endif %} +
Error message{{ entry.burn_summary }}
+
+ {% endif %} {% when None %}{% endmatch %}{% when None %}{% endmatch %} {% endif %}