- Switch to integrated addresses (address+payment_id) -> `make_integrated_address @ RPC)

- Changed homegrown caching solution to use flask extension `flask_cache` instead
- Remove detection of out-going (sent) funds, needs to be manually registered in table "payouts" now
- Updated Flask version
This commit is contained in:
dsc 2020-06-09 04:32:51 +02:00 committed by dsc
parent c0b972edde
commit 401c26e85b
18 changed files with 311 additions and 308 deletions

View file

@ -1,20 +1,28 @@
{% macro tx_item(tx) %}
<li class="list-group-item tx_item">
<span class="datetime">
{{tx['datetime'].strftime('%Y-%m-%d %H:%M')}}
</span>
<span class="height">
<b>Blockheight</b>:
{% if tx['type'] == 'pool' %}
soon^tm
{% else %}
{{tx['height']}}
{% endif %}
{% if tx['type'] == 'pool' %}
soon^tm
{% elif tx['type'] == 'out' %}
<small>hidden</small>
{% else %}
{{tx['block_height']}}
{% endif %}
</span>
<br>
{% if tx['type'] in ['in', 'pool'] %}
<a target="_blank" href="https://explore.wownero.com/tx/{{tx['txid']}}">{{tx['txid'][:32]}}...</a>
{% else %}
{% set lulz = [
'vodka', 'hookers', 'booze', 'strippers', 'new lambo',
'new ferrari', 'new villa', 'new vacation home', 'new tesla',
'new watch', 'new home cinema set', 'throphy wife', 'drugs']
%}
<a style="font-size:11px;" href="#">Sent to author. Enjoy the {{ lulz|random }}!</a>
{% endif %}
<span class="amount{% if tx['type'] in ['pool', 'in'] %} in{% endif %}">
{% if tx['type'] in ['in', 'pool'] %}
+

View file

@ -97,11 +97,13 @@
{{proposal.balance['available']|round(3) or 0 }} WOW Raised
{% set remaining = proposal.funds_target - proposal.balance['available']|float|round(3) %}
<small>
{% if remaining > 0 %}
({{ (proposal.funds_target - proposal.balance['available']|float|round(3)|int) }} WOW until goal)
{% elif remaining < 0 %}
({{ (proposal.balance['available']-proposal.funds_target|float|round(3)|int) }} WOW past goal!)
{% endif %}
</small>
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.balance['pct']}}%;">
@ -113,15 +115,16 @@
<br/>
<div class="col-lg-8">
{{proposal.spends['spent']|round(3) or 0}} WOW Paid out
{{ proposal.spends['amount'] }} WOW Paid out <small>({{ proposal.spends['pct']|round(1) }}%)</small>
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.spends['remaining_pct']}}%;">
<!-- @todo: spends remaining pct -->
<div class="progress-bar progress-warning progress-bar" style="width: {{ proposal.spends['pct'] }}%;">
</div>
</div>
<hr>
</div>
<div class="col-lg-8">
{{(proposal.balance['available']-proposal.spends['spent']) |round(3) or 0}} WOW Available to Payout
{{ (proposal.balance['available']-proposal.spends['amount']) |round(3) or 0}} WOW Available for payout :-)
<div class="progress">
<div class="progress-bar progress-warning progress-bar" style="width: {{proposal.balance['remaining_pct']}}%;">
</div>
@ -185,15 +188,15 @@
<!-- /.row -->
{% endif %}
{% if proposal.spends['txs'] %}
{% if proposal.payouts %}
<div class="row">
<div class="col-md-12">
<div class="card my-6" id="incoming_txs">
<h5 class="card-header">Outgoing transactions <small>({{proposal.spends['txs']|length}})</small></h5>
<h5 class="card-header">Outgoing transactions</h5>
<div class="card-body">
<ul class="list-group">
{% for tx in proposal.spends['txs'] %}
{{ tx_item(tx) }}
{% for payout in proposal.payouts %}
{{ tx_item(payout.as_tx) }}
{% endfor %}
</ul>
</div>