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

Minor fixes #269

Merged
merged 7 commits into from
Aug 4, 2020
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
6 changes: 3 additions & 3 deletions src/cryptoadvance/specter/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def index():
return redirect("/wallets/%s" % app.specter.wallet_manager.wallets[app.specter.wallet_manager.wallets_names[0]].alias)

# TODO: add onboarding process
if len(app.specter.device_manager.devices) == 0:
# For now: can't do anything until a device is registered
return redirect("/new_device/")
# if len(app.specter.device_manager.devices) == 0:
# # For now: can't do anything until a device is registered
# return redirect("/new_device/")

return render_template("base.jinja", specter=app.specter, rand=rand)

Expand Down
14 changes: 14 additions & 0 deletions src/cryptoadvance/specter/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ ul, li{
margin: 0;
padding: 0;
}
.list-item {
margin-bottom: 25px;
}
.list-item::before {
content: "\2022";
color: var(--cmap-blue);
font-weight: bold;
display: inline-block;
width: 0.5em;
margin-left: -0.6em;
font-size: 2.5em;
vertical-align: middle;
line-height: 20px;
}
#menubtn{
position: absolute;
top: 10px;
Expand Down
28 changes: 27 additions & 1 deletion src/cryptoadvance/specter/templates/base.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,33 @@
{% if error %}
<br><br>Something went wrong :(<br><br>{{error}}
{% else %}
<br><br>Nothing here
<br>
<img src="static/img/icon.png" width="130px"/>
<div style="max-width: 60%; text-align: center;">
<br>
<h1 style="font-size: 1.8em;">Welcome to Specter Desktop</h1>
<p style="font-size: 1.2em; font-weight: bolder;">Specter is meant to serve as a convenient and user-friendly GUI around Bitcoin Core, with a focus on multisignature setup with hardware wallets and airgapped (offline) devices.</p>
<a href="https://github.com/cryptoadvance/specter-desktop/blob/master/docs/faq.md" target="_blank" style="color: #fff; font-size: 1.2em; font-weight: bolder;">Read the FAQ</a>
<br><br><br>
<h2 style="font-size: 1.6em;">Getting Started:</h2><br>
<ul style="text-align: left; margin-left: 10%;">
<li class="list-item">
Click on "Add new device" on the left sidebar and follow the instructions to add a device to Specter.<br>
<span class="note">Follow the same process for each device you would like to use as a separate possible (co)signer in a wallet.<span>
</li>
<li class="list-item">
When adding a new device, you will have the option to add multiple <code>xpub</code> keys which belong to it.<br>
Each key has a separate purpose for which it can be used (i.e. P2SH-P2WPKH, P2SH-P2WSH, P2WPKH, P2WSH).<br>
<span class="note">Make sure to import all keys you want to make use of for creating wallets.</span>
</li>
<li class="list-item">
After adding your device(s), you can start adding wallets by clicking on "Add new wallet" on the left sidebar.<br>
<span class="note"><span>
</li>
<li class="list-item">
For any questions or support, you can either open a <a href="https://github.com/cryptoadvance/specter-desktop/issues/new" target="_blank" style="color: #fff">GitHub issue</a> or ask it in the <a href="https://t.me/spectersupport" target="_blank" style="color: #fff">Specter Support Telegram group</a>.
</li>
</ul>
{% endif %}
{% endblock %}
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<div class="grow">
{{ wallet.name }}<br>
<span class="note" style="font-size: 0.75em;">{% if wallet.is_multisig %}{{ wallet.sigs_required }} out of {{ wallet.keys|length }} Multisig{% else %}Single Key{% endif %}</span>
{% if wallet.rescan_progress %}
<br><span class="note" style="font-size: 0.7em;">Rescanning blockchain: {{ "%.2f"|format(wallet.rescan_progress * 100) }}%</span>
{% endif %}
</div>
</a>
{% if wallet.rescan_progress %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@
<small>( {{ wallet.balance["trusted"] | btcamount }} confirmed, {{ wallet.balance["untrusted_pending"] | btcamount }} pending )</small>
{% endif %}
</h1>
{% if wallet.rescan_progress %}
<h2>Rescanning blockchain: {{ "%.2f"|format(wallet.rescan_progress * 100) }}%</h2>
<span class="warning">
&#9432;<br>
Total balance and transactions history may show outdated data during scanning.<br>Please wait until the scanning is complete before you start using the wallet.
</span>
{% endif %}
{%- endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1>Select the type of the wallet</h1>
<div>
<center>
<span>Importing an existing wallet?</span>
<span>Adding a wallet with existing funds?</span>
<div class="tool-tip">
<i class="tool-tip__icon">i</i>
<p class="tool-tip__info">
Expand All @@ -13,27 +13,49 @@
After choosing device(s), click continue, then just select the:<br> "Scan for existing funds" checkbox on the next screen.
<br>
{% if specter.info["pruned"] %}
<span class="warning" style="display: inline-block;">
Please Note:<br>You are using a pruned node.<br> Wallet history may not fully appear.
<span class="warning" style="display: inline-block;">&#9432;<br>
Please Note:<br>You are using a pruned node. Wallet history may not fully appear.
</span>
{% endif %}
</span>
</p>
</div>
</center>
</div>
</div><br>
{% if specter.device_manager.devices|length < 2 %}
<span class="warning" style="display: inline-block;">&#9432;<br>
You must have at least 2 devices to create a multisig.
</span>
{% endif %}
<nav class="row">
<a href="./simple/" class="small-card">
<img src="/static/img/simple_icon.svg"/>
Single key wallet
</a>
<a href="./multisig/" class="small-card">
<a class="small-card" {% if specter.device_manager.devices|length > 1 %}href="./multisig/"{% else %}style="background: transparent; opacity: 0.2;{% endif %}">
<img src="/static/img/multisig_icon.svg"/>
Multisignature wallet
Multisignature wallet<br><br>
</a>
</nav>
<div class="raw">
<button onclick="showPageOverlay('account_map_import')" type="button" class="btn centered padded">Import Existing Wallet</button>
<button onclick="showPageOverlay('account_map_import')" type="button" class="btn centered padded">
Import from wallet software
<div class="tool-tip">
<i class="tool-tip__icon">i</i>
<p class="tool-tip__info">
<span class="info">
<span class="info__title">Import From Wallet Software<br> <br></span>
Click here to import an existing wallet from a wallet software like Fully-Noded or another Specter instance.
<br>
{% if specter.info["pruned"] %}
<span class="warning" style="display: inline-block;">&#9432;<br>
Please Note:<br>You are using a pruned node. Wallet history may not fully appear.
</span>
{% endif %}
</span>
</p>
</div>
</button>
</div>
{% include "wallet/new_wallet/components/import_wallet_account_map.jinja" %}
<div class="note">
Expand Down
2 changes: 1 addition & 1 deletion tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_home(caplog, client):
result = client.get('/')
# By default there is no authentication
assert result.status_code == 200 # OK.
assert b'Nothing here' in result.data
assert b'Welcome to Specter' in result.data
result = client.get('/new_device', follow_redirects=True)
assert result.status_code == 200 # OK.
assert b'Setting up a new device' in result.data
Expand Down