diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml
index 608e2417..18c8d5d6 100644
--- a/.github/workflows/formatting.yml
+++ b/.github/workflows/formatting.yml
@@ -15,3 +15,12 @@ jobs:
- run: python3 -m venv venv
- run: ./venv/bin/pip install black
- run: make checkblack
+ prettier:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ - run: sudo apt-get install python3-venv
+ - run: python3 -m venv venv
+ - run: npm install prettier
+ - run: ./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js
\ No newline at end of file
diff --git a/Makefile b/Makefile
index b9418df5..63f7eb23 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
all: format check requirements.txt
-format: black
+format: prettier black
check: mypy checkprettier checkblack
diff --git a/lnbits/core/templates/core/_api_docs.html b/lnbits/core/templates/core/_api_docs.html
index 5df37676..271568d4 100644
--- a/lnbits/core/templates/core/_api_docs.html
+++ b/lnbits/core/templates/core/_api_docs.html
@@ -48,7 +48,8 @@
{"X-Api-Key": "{{ wallet.inkey }}"}
{"out": false, "amount": <int>, "memo": <string>, "unit": <string>, "webhook": <url:string>}{"out": false, "amount": <int>, "memo": <string>, "unit":
+ <string>, "webhook": <url:string>}
curl -X POST {{ request.base_url }}api/v1/payments -d '{"out": false,
"amount": <int>, "memo": <string>, "webhook":
- <url:string>, "unit": <string>}' -H "X-Api-Key: {{ wallet.inkey }}" -H
- "Content-type: application/json"{{ wallet.inkey }}" -H "Content-type: application/json"
diff --git a/lnbits/extensions/copilot/templates/copilot/_api_docs.html b/lnbits/extensions/copilot/templates/copilot/_api_docs.html
index f0002611..eed25169 100644
--- a/lnbits/extensions/copilot/templates/copilot/_api_docs.html
+++ b/lnbits/extensions/copilot/templates/copilot/_api_docs.html
@@ -31,8 +31,8 @@
[<copilot_object>, ...]
curl -X POST {{ request.base_url }}copilot/api/v1/copilot -d '{"title":
- <string>, "animation": <string>,
+ >curl -X POST {{ request.base_url }}copilot/api/v1/copilot -d
+ '{"title": <string>, "animation": <string>,
"show_message":<string>, "amount": <integer>,
"lnurl_title": <string>}' -H "Content-type: application/json"
-H "X-Api-Key: {{user.wallets[0].adminkey }}"
@@ -59,11 +59,11 @@
Curl example
curl -X POST {{ request.base_url
- }}copilot/api/v1/copilot/<copilot_id> -d '{"title": <string>,
- "animation": <string>, "show_message":<string>,
- "amount": <integer>, "lnurl_title": <string>}' -H
- "Content-type: application/json" -H "X-Api-Key:
- {{user.wallets[0].adminkey }}"
+ }}copilot/api/v1/copilot/<copilot_id> -d '{"title":
+ <string>, "animation": <string>,
+ "show_message":<string>, "amount": <integer>,
+ "lnurl_title": <string>}' -H "Content-type: application/json"
+ -H "X-Api-Key: {{user.wallets[0].adminkey }}"
@@ -87,8 +87,9 @@
[<copilot_object>, ...]
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilot/<copilot_id>
- -H "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}copilot/api/v1/copilot/<copilot_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -110,8 +111,8 @@
[<copilot_object>, ...]
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilots -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}copilot/api/v1/copilots -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -161,9 +162,10 @@
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilot/ws/<string,
- copilot_id>/<string, comment>/<string, gif name> -H
- "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X GET {{ request.base_url
+ }}copilot/api/v1/copilot/ws/<string, copilot_id>/<string,
+ comment>/<string, gif name> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html b/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html
index 40fcfb12..fcda086a 100644
--- a/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html
+++ b/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html
@@ -10,12 +10,19 @@
Discord Bot: Connect Discord users to LNbits.
- Connect your LNbits instance to a Discord Bot leveraging LNbits as a community based lightning node.
+ Connect your LNbits instance to a
+ Discord Bot
+ leveraging LNbits as a community based lightning node.
- Created by, Chris Lennon
+ Created by,
+ Chris Lennon
+
- Based on User Manager, by Ben ArcBen Arc
curl -X POST {{ request.base_url }}discordbot/api/v1/users -d
'{"admin_id": "{{ user.id }}", "wallet_name": <string>,
- "user_name": <string>, "discord_id": <string>}' -H "X-Api-Key: {{
- user.wallets[0].inkey }}" -H "Content-type: application/json"
+ "user_name": <string>, "discord_id": <string>}' -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
+ application/json"
diff --git a/lnbits/extensions/discordbot/templates/discordbot/index.html b/lnbits/extensions/discordbot/templates/discordbot/index.html
index 782f8bb6..70965a70 100644
--- a/lnbits/extensions/discordbot/templates/discordbot/index.html
+++ b/lnbits/extensions/discordbot/templates/discordbot/index.html
@@ -136,7 +136,8 @@
[<jukebox_object>, ...]
curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ >curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox -H
+ "X-Api-Key: {{ user.wallets[0].adminkey }}"
<jukebox_object>
curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox/<juke_id> -H
- "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X GET {{ request.base_url
+ }}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
@@ -86,8 +87,8 @@
<jukbox_object>
curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d '{"user":
- <string, user_id>, "title": <string>,
+ >curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d
+ '{"user": <string, user_id>, "title": <string>,
"wallet":<string>, "sp_user": <string,
spotify_user_account>, "sp_secret": <string,
spotify_user_secret>, "sp_access_token": <string,
@@ -116,8 +117,9 @@
<jukebox_object>
Curl example
curl -X DELETE {{ request.base_url }}jukebox/api/v1/jukebox/<juke_id>
- -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X DELETE {{ request.base_url
+ }}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/livestream/templates/livestream/_api_docs.html b/lnbits/extensions/livestream/templates/livestream/_api_docs.html
index 629e5d9c..fb4853ce 100644
--- a/lnbits/extensions/livestream/templates/livestream/_api_docs.html
+++ b/lnbits/extensions/livestream/templates/livestream/_api_docs.html
@@ -38,8 +38,8 @@
[<livestream_object>, ...]
Curl example
curl -X GET {{ request.base_url }}livestream/api/v1/livestream -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}livestream/api/v1/livestream -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -110,11 +110,11 @@
Curl example
curl -X POST {{ request.base_url }}
- livestream/api/v1/livestream/tracks -d
- '{"name": <string>, "download_url": <string>,
- "price_msat": <integer>, "producer_id": <integer>,
- "producer_name": <string>}' -H "Content-type: application/json"
- -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ livestream/api/v1/livestream/tracks -d '{"name": <string>,
+ "download_url": <string>, "price_msat": <integer>,
+ "producer_id": <integer>, "producer_name": <string>}' -H
+ "Content-type: application/json" -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html b/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html
index dbaa8469..8f9b9b0b 100644
--- a/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html
+++ b/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html
@@ -149,7 +149,13 @@
-
+
{
diff --git a/lnbits/extensions/lnaddress/templates/lnaddress/index.html b/lnbits/extensions/lnaddress/templates/lnaddress/index.html
index dffef837..147bd4f6 100644
--- a/lnbits/extensions/lnaddress/templates/lnaddress/index.html
+++ b/lnbits/extensions/lnaddress/templates/lnaddress/index.html
@@ -191,9 +191,13 @@
type="text"
label="Cloudflare API token"
>
-
- Check extension documentation!
-
+
+ Check extension
+ documentation!
+
Your API key in cloudflare
diff --git a/lnbits/extensions/lnticket/templates/lnticket/index.html b/lnbits/extensions/lnticket/templates/lnticket/index.html
index 6572d98a..6dafb4c2 100644
--- a/lnbits/extensions/lnticket/templates/lnticket/index.html
+++ b/lnbits/extensions/lnticket/templates/lnticket/index.html
@@ -120,7 +120,7 @@
- {{ col.label }}
+ {{ col.label }}
@@ -145,11 +145,13 @@
icon="launch"
:color="($q.dark.isActive) ? 'grey-7' : 'grey-5'"
@click="ticketCard(props)"
- > Click to show ticket
+ > Click to show ticket
- {{ col.label == "Ticket" ? col.value.length > 20 ? `${col.value.substring(0, 20)}...` : col.value : col.value }}
+ {{ col.label == "Ticket" ? col.value.length > 20 ?
+ `${col.value.substring(0, 20)}...` : col.value : col.value }}
@@ -410,7 +412,7 @@
})
})
},
- ticketCard(ticket){
+ ticketCard(ticket) {
this.ticketDialog.show = true
let {date, email, ltext, name} = ticket.row
this.ticketDialog.data = {
@@ -469,7 +471,7 @@
},
updateformDialog: function (formId) {
var link = _.findWhere(this.forms, {id: formId})
- console.log("LINK", link)
+ console.log('LINK', link)
this.formDialog.data.id = link.id
this.formDialog.data.wallet = link.wallet
diff --git a/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html b/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html
index e255d4a0..d5b4b5b8 100644
--- a/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html
+++ b/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html
@@ -39,8 +39,8 @@
[<lnurldevice_object>, ...]
Curl example
curl -X POST {{ request.base_url }}lnurldevice/api/v1/lnurlpos -d '{"title":
- <string>, "message":<string>, "currency":
+ >curl -X POST {{ request.base_url }}lnurldevice/api/v1/lnurlpos -d
+ '{"title": <string>, "message":<string>, "currency":
<integer>}' -H "Content-type: application/json" -H "X-Api-Key:
{{user.wallets[0].adminkey }}"
@@ -104,8 +104,8 @@
Curl example
curl -X GET {{ request.base_url
- }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key:
+ {{ user.wallets[0].inkey }}"
@@ -159,8 +159,8 @@
Curl example
curl -X DELETE {{ request.base_url
- }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key:
+ {{ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html b/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html
index b51e2556..24d19484 100644
--- a/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html
+++ b/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html
@@ -480,12 +480,11 @@
updatedData
)
.then(function (response) {
- self.lnurldeviceLinks = _.reject(
- self.lnurldeviceLinks,
- function (obj) {
- return obj.id === updatedData.id
- }
- )
+ self.lnurldeviceLinks = _.reject(self.lnurldeviceLinks, function (
+ obj
+ ) {
+ return obj.id === updatedData.id
+ })
self.lnurldeviceLinks.push(maplnurldevice(response.data))
self.formDialoglnurldevice.show = false
self.clearFormDialoglnurldevice()
diff --git a/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html b/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html
index bf920558..200865fb 100644
--- a/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html
+++ b/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html
@@ -17,8 +17,8 @@
[<pay_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}lnurlp/api/v1/links -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}lnurlp/api/v1/links -H "X-Api-Key:
+ {{ user.wallets[0].inkey }}"
@@ -39,8 +39,8 @@
{"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -H
- "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}lnurlp/api/v1/links/<pay_id>
+ -H "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -68,11 +68,11 @@
{"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}lnurlp/api/v1/links -d '{"description":
- <string>, "amount": <integer>, "max": <integer>,
- "min": <integer>, "comment_chars": <integer>}' -H
- "Content-type: application/json" -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ >curl -X POST {{ request.base_url }}lnurlp/api/v1/links -d
+ '{"description": <string>, "amount": <integer>, "max":
+ <integer>, "min": <integer>, "comment_chars":
+ <integer>}' -H "Content-type: application/json" -H "X-Api-Key:
+ {{ user.wallets[0].adminkey }}"
@@ -99,8 +99,8 @@
{"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -d
- '{"description": <string>, "amount": <integer>}' -H
+ >curl -X PUT {{ request.base_url }}lnurlp/api/v1/links/<pay_id>
+ -d '{"description": <string>, "amount": <integer>}' -H
"Content-type: application/json" -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
@@ -126,8 +126,9 @@
Curl example
curl -X DELETE {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -H
- "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X DELETE {{ request.base_url
+ }}lnurlp/api/v1/links/<pay_id> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
index bd68b629..a472d549 100644
--- a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
+++ b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
@@ -127,7 +127,13 @@
-
+
DELETE
diff --git a/lnbits/extensions/paywall/templates/paywall/_api_docs.html b/lnbits/extensions/paywall/templates/paywall/_api_docs.html
index 664cda0f..2c8fe672 100644
--- a/lnbits/extensions/paywall/templates/paywall/_api_docs.html
+++ b/lnbits/extensions/paywall/templates/paywall/_api_docs.html
@@ -17,8 +17,8 @@
[<paywall_object>, ...]
Curl example
curl -X GET {{ request.base_url }}paywall/api/v1/paywalls -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}paywall/api/v1/paywalls -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -48,11 +48,11 @@
>
Curl example
curl -X POST {{ request.base_url }}paywall/api/v1/paywalls -d '{"url":
- <string>, "memo": <string>, "description": <string>,
- "amount": <integer>, "remembers": <boolean>}' -H
- "Content-type: application/json" -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ >curl -X POST {{ request.base_url }}paywall/api/v1/paywalls -d
+ '{"url": <string>, "memo": <string>, "description":
+ <string>, "amount": <integer>, "remembers":
+ <boolean>}' -H "Content-type: application/json" -H "X-Api-Key:
+ {{ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html b/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html
index 644bcdfe..a80fd37a 100644
--- a/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html
+++ b/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html
@@ -17,8 +17,8 @@
[<satsdice_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satsdice/api/v1/links -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}satsdice/api/v1/links -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -44,8 +44,9 @@
{"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}satsdice/api/v1/links/<satsdice_id> -H
- "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}satsdice/api/v1/links/<satsdice_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -73,8 +74,8 @@
{"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}satsdice/api/v1/links -d '{"title":
- <string>, "min_satsdiceable": <integer>,
+ >curl -X POST {{ request.base_url }}satsdice/api/v1/links -d
+ '{"title": <string>, "min_satsdiceable": <integer>,
"max_satsdiceable": <integer>, "uses": <integer>,
"wait_time": <integer>, "is_unique": <boolean>}' -H
"Content-type: application/json" -H "X-Api-Key: {{
@@ -109,8 +110,9 @@
{"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}satsdice/api/v1/links/<satsdice_id> -d
- '{"title": <string>, "min_satsdiceable": <integer>,
+ >curl -X PUT {{ request.base_url
+ }}satsdice/api/v1/links/<satsdice_id> -d '{"title":
+ <string>, "min_satsdiceable": <integer>,
"max_satsdiceable": <integer>, "uses": <integer>,
"wait_time": <integer>, "is_unique": <boolean>}' -H
"Content-type: application/json" -H "X-Api-Key: {{
@@ -137,8 +139,9 @@
Curl example
curl -X DELETE {{ request.base_url }}satsdice/api/v1/links/<satsdice_id>
- -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X DELETE {{ request.base_url
+ }}satsdice/api/v1/links/<satsdice_id> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
@@ -165,8 +168,8 @@
Curl example
curl -X GET {{ request.base_url
- }}satsdice/api/v1/links/<the_hash>/<lnurl_id> -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ }}satsdice/api/v1/links/<the_hash>/<lnurl_id> -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
diff --git a/lnbits/extensions/satspay/templates/satspay/_api_docs.html b/lnbits/extensions/satspay/templates/satspay/_api_docs.html
index 89380de0..77451ae5 100644
--- a/lnbits/extensions/satspay/templates/satspay/_api_docs.html
+++ b/lnbits/extensions/satspay/templates/satspay/_api_docs.html
@@ -60,12 +60,13 @@
[<charge_object>, ...]
Curl example
curl -X POST {{ request.base_url }}satspay/api/v1/charge/<charge_id>
- -d '{"onchainwallet": <string, watchonly_wallet_id>,
- "description": <string>, "webhook":<string>, "time":
- <integer>, "amount": <integer>, "lnbitswallet":
- <string, lnbits_wallet_id>}' -H "Content-type:
- application/json" -H "X-Api-Key: {{user.wallets[0].adminkey }}"
+ >curl -X POST {{ request.base_url
+ }}satspay/api/v1/charge/<charge_id> -d '{"onchainwallet":
+ <string, watchonly_wallet_id>, "description": <string>,
+ "webhook":<string>, "time": <integer>, "amount":
+ <integer>, "lnbitswallet": <string, lnbits_wallet_id>}'
+ -H "Content-type: application/json" -H "X-Api-Key:
+ {{user.wallets[0].adminkey }}"
@@ -89,8 +90,9 @@
[<charge_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satspay/api/v1/charge/<charge_id>
- -H "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}satspay/api/v1/charge/<charge_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -112,8 +114,8 @@
[<charge_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satspay/api/v1/charges -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}satspay/api/v1/charges -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -145,7 +147,8 @@
diff --git a/lnbits/extensions/splitpayments/static/js/index.js b/lnbits/extensions/splitpayments/static/js/index.js
index dea469e5..d9750bef 100644
--- a/lnbits/extensions/splitpayments/static/js/index.js
+++ b/lnbits/extensions/splitpayments/static/js/index.js
@@ -119,7 +119,7 @@ new Vue({
'/splitpayments/api/v1/targets',
this.selectedWallet.adminkey,
{
- "targets": this.targets
+ targets: this.targets
.filter(isTargetComplete)
.map(({wallet, percent, alias}) => ({wallet, percent, alias}))
}
diff --git a/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html b/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html
index 7a8a6d07..4cf7190c 100644
--- a/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html
+++ b/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html
@@ -52,8 +52,8 @@
>
Curl example
curl -X GET {{ request.base_url }}splitpayments/api/v1/targets -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}splitpayments/api/v1/targets -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
diff --git a/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html b/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html
index 42788bad..95ba6e06 100644
--- a/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html
+++ b/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html
@@ -4,10 +4,9 @@
Tip Jar: Receive tips with messages!
- Your personal Bitcoin tip page, which supports
- lightning and on-chain payments.
- Notifications, including a donation message,
- can be sent via webhook.
+ Your personal Bitcoin tip page, which supports lightning and on-chain
+ payments. Notifications, including a donation message, can be sent via
+ webhook.
Created by, Fitti
diff --git a/lnbits/extensions/tipjar/templates/tipjar/index.html b/lnbits/extensions/tipjar/templates/tipjar/index.html
index dda49842..19fca6e4 100644
--- a/lnbits/extensions/tipjar/templates/tipjar/index.html
+++ b/lnbits/extensions/tipjar/templates/tipjar/index.html
@@ -322,11 +322,7 @@
var self = this
LNbits.api
- .request(
- 'GET',
- '/tipjar/api/v1/tips',
- this.g.user.wallets[0].inkey
- )
+ .request('GET', '/tipjar/api/v1/tips', this.g.user.wallets[0].inkey)
.then(function (response) {
self.tips = response.data.map(function (obj) {
return mapTipJar(obj)
diff --git a/lnbits/extensions/tpos/templates/tpos/_api_docs.html b/lnbits/extensions/tpos/templates/tpos/_api_docs.html
index 42160cce..8930d990 100644
--- a/lnbits/extensions/tpos/templates/tpos/_api_docs.html
+++ b/lnbits/extensions/tpos/templates/tpos/_api_docs.html
@@ -69,8 +69,8 @@
Curl example
curl -X DELETE {{ request.base_url }}tpos/api/v1/tposs/<tpos_id> -H
- "X-Api-Key: <admin_key>"
+ >curl -X DELETE {{ request.base_url
+ }}tpos/api/v1/tposs/<tpos_id> -H "X-Api-Key: <admin_key>"
diff --git a/lnbits/extensions/tpos/templates/tpos/index.html b/lnbits/extensions/tpos/templates/tpos/index.html
index af3b0573..76f33000 100644
--- a/lnbits/extensions/tpos/templates/tpos/index.html
+++ b/lnbits/extensions/tpos/templates/tpos/index.html
@@ -54,7 +54,8 @@
>
- {{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ") : col.value) }}
+ {{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ")
+ : col.value) }}
parseInt(str))) : JSON.stringify([])),
- tip_wallet: this.formDialog.data.tip_wallet || "",
+ tip_options: this.formDialog.data.tip_options
+ ? JSON.stringify(
+ this.formDialog.data.tip_options.map(str => parseInt(str))
+ )
+ : JSON.stringify([]),
+ tip_wallet: this.formDialog.data.tip_wallet || ''
}
var self = this
diff --git a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html
index bff66383..b421186a 100644
--- a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html
+++ b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html
@@ -37,8 +37,8 @@
[<wallets_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/wallet -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}watchonly/api/v1/wallet -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -66,8 +66,9 @@
[<wallet_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/wallet/<wallet_id>
- -H "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}watchonly/api/v1/wallet/<wallet_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -89,9 +90,10 @@
[<wallet_object>, ...]
Curl example
curl -X POST {{ request.base_url }}watchonly/api/v1/wallet -d '{"title":
- <string>, "masterpub": <string>}' -H "Content-type:
- application/json" -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X POST {{ request.base_url }}watchonly/api/v1/wallet -d
+ '{"title": <string>, "masterpub": <string>}' -H
+ "Content-type: application/json" -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
@@ -173,8 +175,9 @@
[<address_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/address/<wallet_id>
- -H "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}watchonly/api/v1/address/<wallet_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -202,8 +205,8 @@
[<mempool_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/mempool -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ >curl -X GET {{ request.base_url }}watchonly/api/v1/mempool -H
+ "X-Api-Key: {{ user.wallets[0].adminkey }}"
@@ -233,9 +236,9 @@
[<mempool_object>, ...]
Curl example
curl -X PUT {{ request.base_url }}watchonly/api/v1/mempool -d '{"endpoint":
- <string>}' -H "Content-type: application/json" -H "X-Api-Key:
- {{ user.wallets[0].adminkey }}"
+ >curl -X PUT {{ request.base_url }}watchonly/api/v1/mempool -d
+ '{"endpoint": <string>}' -H "Content-type: application/json"
+ -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
diff --git a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
index 76068fcb..095aad3a 100644
--- a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
+++ b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
@@ -22,8 +22,8 @@
[<withdraw_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}withdraw/api/v1/links -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url }}withdraw/api/v1/links -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -49,8 +49,9 @@
{"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}withdraw/api/v1/links/<withdraw_id> -H
- "X-Api-Key: {{ user.wallets[0].inkey }}"
+ >curl -X GET {{ request.base_url
+ }}withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: {{
+ user.wallets[0].inkey }}"
@@ -79,12 +80,12 @@
{"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}withdraw/api/v1/links -d '{"title":
- <string>, "min_withdrawable": <integer>,
+ >curl -X POST {{ request.base_url }}withdraw/api/v1/links -d
+ '{"title": <string>, "min_withdrawable": <integer>,
"max_withdrawable": <integer>, "uses": <integer>,
- "wait_time": <integer>, "is_unique": <boolean>, "webhook_url": <string>}' -H
- "Content-type: application/json" -H "X-Api-Key: {{
- user.wallets[0].adminkey }}"
+ "wait_time": <integer>, "is_unique": <boolean>,
+ "webhook_url": <string>}' -H "Content-type: application/json" -H
+ "X-Api-Key: {{ user.wallets[0].adminkey }}"
@@ -115,8 +116,9 @@
{"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}withdraw/api/v1/links/<withdraw_id> -d
- '{"title": <string>, "min_withdrawable": <integer>,
+ >curl -X PUT {{ request.base_url
+ }}withdraw/api/v1/links/<withdraw_id> -d '{"title":
+ <string>, "min_withdrawable": <integer>,
"max_withdrawable": <integer>, "uses": <integer>,
"wait_time": <integer>, "is_unique": <boolean>}' -H
"Content-type: application/json" -H "X-Api-Key: {{
@@ -143,8 +145,9 @@
Curl example
curl -X DELETE {{ request.base_url }}withdraw/api/v1/links/<withdraw_id>
- -H "X-Api-Key: {{ user.wallets[0].adminkey }}"
+ >curl -X DELETE {{ request.base_url
+ }}withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: {{
+ user.wallets[0].adminkey }}"
@@ -171,8 +174,8 @@
Curl example
curl -X GET {{ request.base_url
- }}withdraw/api/v1/links/<the_hash>/<lnurl_id> -H "X-Api-Key: {{
- user.wallets[0].inkey }}"
+ }}withdraw/api/v1/links/<the_hash>/<lnurl_id> -H
+ "X-Api-Key: {{ user.wallets[0].inkey }}"
diff --git a/lnbits/extensions/withdraw/templates/withdraw/csv.html b/lnbits/extensions/withdraw/templates/withdraw/csv.html
index d8f8c4d0..62902905 100644
--- a/lnbits/extensions/withdraw/templates/withdraw/csv.html
+++ b/lnbits/extensions/withdraw/templates/withdraw/csv.html
@@ -1,10 +1,12 @@
-{% extends "print.html" %} {% block page %} {% for page in link %} {% for threes in page %} {% for one in threes %} {{one}}, {% endfor %} {% endfor %} {% endfor %} {% endblock %} {% block scripts %}
+{% extends "print.html" %} {% block page %} {% for page in link %} {% for threes
+in page %} {% for one in threes %} {{one}}, {% endfor %} {% endfor %} {% endfor
+%} {% endblock %} {% block scripts %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/lnbits/extensions/withdraw/templates/withdraw/index.html b/lnbits/extensions/withdraw/templates/withdraw/index.html
index f6ea220d..6d3ab374 100644
--- a/lnbits/extensions/withdraw/templates/withdraw/index.html
+++ b/lnbits/extensions/withdraw/templates/withdraw/index.html
@@ -1,28 +1,40 @@
-{% extends "base.html" %} {% from "macros.jinja" import window_vars with context %} {% block scripts %} {{ window_vars(user) }}
+{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
+%} {% block scripts %} {{ window_vars(user) }}
{% endblock %} {% block page %}
-
-
-
- Quick vouchers
- Advanced withdraw link(s)
-
-
+
+
+
+ Quick vouchers
+ Advanced withdraw link(s)
+
+
-
-
-
-
- Withdraw links
-
-
- Export to CSV
-
-
-
- {% raw %}
-
+
+
+
+
+ Withdraw links
+
+
+ Export to CSV
+
+
+
+ {% raw %}
+
@@ -32,7 +44,7 @@
-
+
- {% endraw %}
-
-
-
-
+
+ {% endraw %}
+
+
+
+
-
-
-
-
- {{SITE_TITLE}} LNURL-withdraw extension
-
-
-
-
-
- {% include "withdraw/_api_docs.html" %}
-
- {% include "withdraw/_lnurl.html" %}
-
-
-
-
+
+
+
+
+ {{SITE_TITLE}} LNURL-withdraw extension
+
+
+
+
+
+ {% include "withdraw/_api_docs.html" %}
+
+ {% include "withdraw/_lnurl.html" %}
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Use unique withdraw QR codes to reduce `assmilking`
-
- This is recommended if you are sharing the links on social media or print QR codes.
-
-
-
-
- Update withdraw link
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Use unique withdraw QR codes to reduce `assmilking`
+
+ This is recommended if you are sharing the links on social
+ media or print QR codes.
+
+
+
+
+ Update withdraw link
+ Create withdraw link
- Cancel
-
-
-
-
+ formDialog.data.wait_time == null"
+ type="submit"
+ >Create withdraw link
+ Cancel
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+ Create vouchers
- Cancel
-
-
-
-
+ simpleformDialog.data.uses == null"
+ type="submit"
+ >Create vouchers
+ Cancel
+
+
+
+
-
-
-
-
- {% raw %}
-
-
- ID: {{ qrCodeDialog.data.id }}
- Unique: {{ qrCodeDialog.data.is_unique }}
+
+
+
+
+ {% raw %}
+
+
+ ID: {{ qrCodeDialog.data.id }}
+ Unique: {{ qrCodeDialog.data.is_unique }}
(QR code will change after each withdrawal)
Max. withdrawable: {{
@@ -259,4 +382,4 @@