diff --git a/static/js/index.js b/static/js/index.js index e9951f1..4c09507 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -116,7 +116,6 @@ new Vue({ if (this.formDialog.fixedAmount) data.max = data.min if (data.currency === 'satoshis') data.currency = null if (isNaN(parseInt(data.comment_chars))) data.comment_chars = 0 - if (data.id) { this.updatePayLink(wallet, data) } else { @@ -131,33 +130,12 @@ new Vue({ } }, updatePayLink(wallet, data) { - let values = _.omit( - _.pick( - data, - 'description', - 'min', - 'max', - 'webhook_url', - 'success_text', - 'success_url', - 'comment_chars', - 'currency', - 'username', - 'zaps' - ), - (value, key) => - (key === 'webhook_url' || - key === 'success_text' || - key === 'success_url') && - (value === null || value === '') - ) - LNbits.api .request( 'PUT', '/lnurlp/api/v1/links/' + data.id, wallet.adminkey, - values + data ) .then(response => { this.payLinks = _.reject(this.payLinks, obj => obj.id === data.id) diff --git a/templates/lnurlp/index.html b/templates/lnurlp/index.html index 4b8202e..38f93c6 100644 --- a/templates/lnurlp/index.html +++ b/templates/lnurlp/index.html @@ -4,9 +4,7 @@
ID: {{ qrCodeDialog.data.id }}
Amount: {{ qrCodeDialog.data.amount }}
- {{ qrCodeDialog.data.currency }} price:
+ {{ qrCodeDialog.data.currency }} price:
{{
- fiatRates[qrCodeDialog.data.currency]
- ? fiatRates[qrCodeDialog.data.currency] + ' sat'
- : 'Loading...'
- }}
+ fiatRates[qrCodeDialog.data.currency]
+ ? fiatRates[qrCodeDialog.data.currency] + ' sat'
+ : 'Loading...'
+ }}
Accepts comments: {{ qrCodeDialog.data.comments
}}
Dispatches webhook to: {{ qrCodeDialog.data.webhook
@@ -387,37 +232,17 @@