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

This commit is contained in:
moneroexamples 2017-01-18 20:30:15 +08:00
parent 4809e3f972
commit 82ed1e63b1
2 changed files with 11 additions and 2 deletions

View file

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

View file

@ -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>