evade lnurl encoding error for withdraw_full QR on localhost.

This commit is contained in:
fiatjaf 2021-04-21 23:27:21 -03:00
parent 2aa4a93da1
commit b55cc82f1c
2 changed files with 9 additions and 6 deletions

View file

@ -52,7 +52,10 @@ class Wallet(NamedTuple):
wal=self.id,
_external=True,
)
return lnurl_encode(url)
try:
return lnurl_encode(url)
except:
return ""
def lnurlauth_key(self, domain: str) -> SigningKey:
hashing_key = hashlib.sha256(self.id.encode("utf-8")).digest()

View file

@ -231,11 +231,9 @@
<q-list>
{% include "core/_api_docs.html" %}
<q-separator></q-separator>
<q-expansion-item
group="extras"
icon="crop_free"
label="Drain Funds"
>
{% if wallet.lnurlwithdraw_full %}
<q-expansion-item group="extras" icon="crop_free" label="Drain Funds">
<q-card>
<q-card-section class="text-center">
<p>
@ -257,6 +255,8 @@
</q-card>
</q-expansion-item>
<q-separator></q-separator>
{% endif %}
<q-expansion-item
group="extras"
icon="settings_cell"