fix: show zero in matched outputs when its acctually zero.

master
moneroexamples 8 years ago
parent 4809e3f972
commit 82ed1e63b1

@ -1550,7 +1550,8 @@ public:
context.emplace("outputs", outputs); context.emplace("outputs", outputs);
context["sum_xmr"] = xmreg::xmr_amount_to_str(sum_xmr); context["found_our_outputs"] = (sum_xmr > 0);
context["sum_xmr"] = xmreg::xmr_amount_to_str(sum_xmr);
context.emplace("inputs", inputs); context.emplace("inputs", inputs);
context["show_inputs"] = false; context["show_inputs"] = false;

@ -62,7 +62,15 @@
{{/outputs}} {{/outputs}}
</table> </table>
<h3>Sum XMR from matched outputs: {{sum_xmr}}</h3> <h3>
Sum XMR from matched outputs:
{{#found_our_outputs}}
{{sum_xmr}}
{{/found_our_outputs}}
{{^found_our_outputs}}
0.000000000000
{{/found_our_outputs}}
</h3>
</div> </div>

Loading…
Cancel
Save