Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List wallets using a device and devices of a wallet #196

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/cryptoadvance/specter/templates/device/device.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,22 @@
</form>
{# TODO: Add wallets used in #}
</div>
<br>
{% if wallets %}
<h1>Wallets Using This Device</h1>
<div class="row overflow">
{% for wallet in wallets %}
<a href="{{ url_for('wallet', wallet_alias=wallet.alias) }}" style="text-decoration: none;">
<div class="small-card radio">
{% if wallet.is_multisig %}
<img src="/static/img/multisig_icon.svg" width="18px">
{% else %}
<img src="/static/img/simple_icon.svg" width="18px">
{% endif %}
{{ wallet.name }}
</div>
</a>
{% endfor %}
</div>
{% endif %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block content %}<br>
<h1>Keypool control</h1>
<form action="." method="POST" class="padded" style="width: 500px">
<div>Currently watching {{ wallet.keypool }} receiving and {{ wallet.change_keypool }} change addresses.<div>
<div>Currently watching {{ wallet.keypool }} receiving and {{ wallet.change_keypool }} change addresses.</div>
<div class="row aligned">
<div style="flex-grow: 1">Watch <input type="number" name="keypooladd" value="100" step="1" style="margin: 10px" class="inline"> more addresses </div>
<button type="submit" name="action" value="keypoolrefill" class="btn" style="max-width: 130px; margin-left: 20px">Add</button>
Expand Down Expand Up @@ -34,6 +34,22 @@
{% endif %}
</form>
<br>
<h1>Wallet Devices</h1>
<div class="row overflow">
{% for device in wallet.devices %}
<a href="{{ url_for('device', device_alias=device.alias) }}" style="text-decoration: none;">
<div class="small-card radio">
{% if device.device_type in ['specter', 'coldcard', 'trezor', 'ledger'] %}
<img src="/static/img/{{ device.device_type }}_icon.svg" width="18px">
{% else %}
<img src="/static/img/other_icon.svg" width="18px">
{% endif %}
{{ device.name }}
</div>
</a>
{% endfor %}
</div>
<br>
<h1>Cache</h1>
<form action="." method="POST" class="padded" style="width: 500px">
<div class="row center">
Expand Down