Skip to content

Commit 1d2fea9

Browse files
relativisticelectronk9ert
andauthored
Bugfix: No encryption for devhel extension required (#1942)
* make that user_secret_decrypted_required is not required for devehlp * tiny fix for unset wallets Co-authored-by: k9ert <[email protected]>
1 parent ba5873d commit 1d2fea9

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/cryptoadvance/specterext/devhelp/controller.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
@devhelp_endpoint.route("/")
1717
@login_required
18-
@user_secret_decrypted_required
1918
def index():
2019
return render_template(
2120
"devhelp/index.jinja",
@@ -42,7 +41,6 @@ def console():
4241

4342
@devhelp_endpoint.route("/settings", methods=["GET"])
4443
@login_required
45-
@user_secret_decrypted_required
4644
def settings_get():
4745
associated_wallet: Wallet = DevhelpService.get_associated_wallet()
4846

@@ -60,7 +58,6 @@ def settings_get():
6058

6159
@devhelp_endpoint.route("/settings", methods=["POST"])
6260
@login_required
63-
@user_secret_decrypted_required
6461
def settings_post():
6562
show_menu = request.form["show_menu"]
6663
user = app.specter.user_manager.get_user()

src/cryptoadvance/specterext/devhelp/templates/devhelp/html/address-data.jinja

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<h1>address-data</h1>
77

8-
{% include "includes/address-data.html" %}
8+
99

1010

1111
<code class="html"><textarea rows="40" cols="90" style="height: 200px">
@@ -27,19 +27,28 @@
2727

2828
<p>
2929
Address-Data needs an existing wallet-alias and a valid address as the component is making an Ajax-call to <code>{{ url_for('wallets_endpoint_api.addressinfo', wallet_alias='WALLET_ALIAS') }}</code>
30-
wallet-alias and address need to be defined in order to get a valid response. You can do that here:
30+
wallet-alias and address need to be defined in order to get a valid response.
31+
32+
Unfortunately, there is jinja-code in the component and therefore, we need a wallet. This is hopefully getting fixed in <a href="https://github.com/cryptoadvance/specter-desktop/issues/1956">#1956</a>
33+
34+
You can do that here:
3135
</p>
3236

3337

34-
{% include "devhelp/includes/set-wallet.html" %}
35-
<br>
36-
{% include "devhelp/includes/set-address.html" %}
3738

3839

3940

4041
<h2>Render example</h2>
4142
<br><br>
4243

44+
{% if wallet %}
45+
46+
{% include "includes/address-data.html" %}
47+
48+
{% include "devhelp/includes/set-wallet.html" %}
49+
<br>
50+
{% include "devhelp/includes/set-address.html" %}
51+
4352
<address-data
4453
id="someid"
4554
data-verify-qr="False"
@@ -52,6 +61,11 @@ wallet-alias and address need to be defined in order to get a valid response. Yo
5261
data-service-id="undefined"
5362
data-label="Address #5"
5463
data-address-wallet="myliquidhot"></address-data>
64+
65+
{% else %}
66+
<h3>Sorry no rendering example, due to not having a wallet</h3>
67+
{% endif %}
68+
5569
{% endblock %}
5670

5771
{% block scripts %}

0 commit comments

Comments
 (0)