2.6 KiB
2.6 KiB
{%- macro display(tx, text=false) -%}
{% if tx.info.version >= 4 -%}
{% if tx.info.type == 1 and 'sn_state_change' in tx.extra -%}
{% if tx.extra.sn_state_change.type == 'decom' -%}
👎{%if text%} decommission{%endif%}
{% elif tx.extra.sn_state_change.type == 'recom' -%}
👍{%if text%} recommission{%endif%}
{% elif tx.extra.sn_state_change.type == 'dereg' -%}
🚫{%if text%} deregistration{%endif%}
{% elif tx.extra.sn_state_change.type == 'ip' -%}
📋{%if text%} ip change{%endif%}
{% else -%}
❓{%if text%} unknown state change{%endif%}
{% endif -%}
{% elif tx.info.type == 2 -%}
🔓{%if text%} unlock{%endif%}
{% elif tx.info.type == 4 and 'lns' in tx.extra -%}
{% if 'buy' in tx.extra.lns -%}
🎫{%if text%} LNS purchase{%endif%}
{% elif 'update' in tx.extra.lns -%}
💾{%if text%} LNS update{%endif%}
{% endif -%}
{% elif 'sn_registration' in tx.extra -%}
🏁{%if text%} registration{%endif%}
{%- elif 'sn_contributor' in tx.extra -%}
⚑
{%-if text%} contribution{%endif%}
{%- elif text -%}
{%if tx.coinbase%}block reward{%else%}transfer{%endif%}
{%- endif -%}
{%- elif standard -%}
{%if tx.coinbase%}block reward{%else%}transfer{%endif%}
{%- endif -%}
{% endmacro -%}