Browse Source

fix OP_RETURN decoded displays

fix-133-memory-crash
Dan Janosik 8 years ago
parent
commit
d576caf510
  1. 3
      views/includes/block-content.pug
  2. 4
      views/transaction.pug

3
views/includes/block-content.pug

@ -202,6 +202,9 @@ div(class="tab-content")
span(class="monospace") Segregated Witness committment - span(class="monospace") Segregated Witness committment -
a(href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure") docs a(href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure") docs
i(class="fa fa-external-link") i(class="fa fa-external-link")
else if (vout.scriptPubKey.asm && vout.scriptPubKey.asm.startsWith('OP_RETURN '))
span(class="monospace") OP_RETURN:
span(class="monospace text-muted") #{utils.hex2ascii(vout.scriptPubKey.asm.substring("OP_RETURN ".length))}
td td
span(class="monospace") #{vout.value} span(class="monospace") #{vout.value}
- totalOutputValue = totalOutputValue.plus(vout.value); - totalOutputValue = totalOutputValue.plus(vout.value);

4
views/transaction.pug

@ -224,9 +224,9 @@ block content
span(class="monospace") Segregated Witness committment - span(class="monospace") Segregated Witness committment -
a(href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure") docs a(href="https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure") docs
i(class="fa fa-external-link") i(class="fa fa-external-link")
else if (vout.scriptPubKey.hex && vout.scriptPubKey.hex.startsWith('6a4b')) else if (vout.scriptPubKey.asm && vout.scriptPubKey.asm.startsWith('OP_RETURN '))
span(class="monospace") OP_RETURN: span(class="monospace") OP_RETURN:
span(class="monospace text-muted") #{utils.hex2ascii(vout.scriptPubKey.hex.substring(4))} span(class="monospace text-muted") #{utils.hex2ascii(vout.scriptPubKey.asm.substring("OP_RETURN ".length))}
td td
span(class="monospace") #{vout.value} span(class="monospace") #{vout.value}

Loading…
Cancel
Save