mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 20:42:32 +02:00
Merge branch 'main' into matthewcroughan/nixify
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -31,6 +31,7 @@ venv
|
|||||||
|
|
||||||
__bundle__
|
__bundle__
|
||||||
|
|
||||||
|
coverage.xml
|
||||||
node_modules
|
node_modules
|
||||||
lnbits/static/bundle.*
|
lnbits/static/bundle.*
|
||||||
docker
|
docker
|
||||||
|
3
Makefile
3
Makefile
@@ -36,7 +36,6 @@ requirements.txt: Pipfile.lock
|
|||||||
cat Pipfile.lock | jq -r '.default | map_values(.version) | to_entries | map("\(.key)\(.value)") | join("\n")' > requirements.txt
|
cat Pipfile.lock | jq -r '.default | map_values(.version) | to_entries | map("\(.key)\(.value)") | join("\n")' > requirements.txt
|
||||||
|
|
||||||
test:
|
test:
|
||||||
rm -rf ./tests/data
|
|
||||||
mkdir -p ./tests/data
|
mkdir -p ./tests/data
|
||||||
LNBITS_BACKEND_WALLET_CLASS="FakeWallet" \
|
LNBITS_BACKEND_WALLET_CLASS="FakeWallet" \
|
||||||
FAKE_WALLET_SECRET="ToTheMoon1" \
|
FAKE_WALLET_SECRET="ToTheMoon1" \
|
||||||
@@ -45,14 +44,12 @@ test:
|
|||||||
./venv/bin/pytest --durations=1 -s --cov=lnbits --cov-report=xml tests
|
./venv/bin/pytest --durations=1 -s --cov=lnbits --cov-report=xml tests
|
||||||
|
|
||||||
test-real-wallet:
|
test-real-wallet:
|
||||||
rm -rf ./tests/data
|
|
||||||
mkdir -p ./tests/data
|
mkdir -p ./tests/data
|
||||||
LNBITS_DATA_FOLDER="./tests/data" \
|
LNBITS_DATA_FOLDER="./tests/data" \
|
||||||
PYTHONUNBUFFERED=1 \
|
PYTHONUNBUFFERED=1 \
|
||||||
./venv/bin/pytest --durations=1 -s --cov=lnbits --cov-report=xml tests
|
./venv/bin/pytest --durations=1 -s --cov=lnbits --cov-report=xml tests
|
||||||
|
|
||||||
test-pipenv:
|
test-pipenv:
|
||||||
rm -rf ./tests/data
|
|
||||||
mkdir -p ./tests/data
|
mkdir -p ./tests/data
|
||||||
LNBITS_BACKEND_WALLET_CLASS="FakeWallet" \
|
LNBITS_BACKEND_WALLET_CLASS="FakeWallet" \
|
||||||
FAKE_WALLET_SECRET="ToTheMoon1" \
|
FAKE_WALLET_SECRET="ToTheMoon1" \
|
||||||
|
@@ -169,7 +169,9 @@
|
|||||||
<h5 class="q-mt-none">
|
<h5 class="q-mt-none">
|
||||||
{% raw %}{{ fsat }}
|
{% raw %}{{ fsat }}
|
||||||
<small>sat</small>
|
<small>sat</small>
|
||||||
<span style="font-size: 0.75rem">( + {{ tipAmountSat }} tip)</span>
|
<span v-show="tip_options" style="font-size: 0.75rem"
|
||||||
|
>( + {{ tipAmountSat }} tip)</span
|
||||||
|
>
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
@@ -275,7 +277,7 @@
|
|||||||
return {
|
return {
|
||||||
tposId: '{{ tpos.id }}',
|
tposId: '{{ tpos.id }}',
|
||||||
currency: '{{ tpos.currency }}',
|
currency: '{{ tpos.currency }}',
|
||||||
tip_options: JSON.parse('{{ tpos.tip_options }}'),
|
tip_options: null,
|
||||||
exchangeRate: null,
|
exchangeRate: null,
|
||||||
stack: [],
|
stack: [],
|
||||||
tipAmount: 0.0,
|
tipAmount: 0.0,
|
||||||
@@ -352,7 +354,7 @@
|
|||||||
this.showInvoice()
|
this.showInvoice()
|
||||||
},
|
},
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
if (this.tip_options.length) {
|
if (this.tip_options) {
|
||||||
this.showTipModal()
|
this.showTipModal()
|
||||||
} else {
|
} else {
|
||||||
this.showInvoice()
|
this.showInvoice()
|
||||||
@@ -417,6 +419,11 @@
|
|||||||
created: function () {
|
created: function () {
|
||||||
var getRates = this.getRates
|
var getRates = this.getRates
|
||||||
getRates()
|
getRates()
|
||||||
|
this.tip_options =
|
||||||
|
'{{ tpos.tip_options | tojson }}' == 'null'
|
||||||
|
? null
|
||||||
|
: JSON.parse('{{ tpos.tip_options }}')
|
||||||
|
console.log(typeof this.tip_options, this.tip_options)
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
getRates()
|
getRates()
|
||||||
}, 20000)
|
}, 20000)
|
||||||
|
@@ -102,6 +102,8 @@ def insert_to_pg(query, data):
|
|||||||
print(e)
|
print(e)
|
||||||
print(f"Failed to insert {d}")
|
print(f"Failed to insert {d}")
|
||||||
else:
|
else:
|
||||||
|
print("query:", query)
|
||||||
|
print("data:", d)
|
||||||
raise ValueError(f"Failed to insert {d}")
|
raise ValueError(f"Failed to insert {d}")
|
||||||
connection.commit()
|
connection.commit()
|
||||||
|
|
||||||
@@ -259,9 +261,10 @@ def migrate_ext(sqlite_db_file, schema, ignore_missing=True):
|
|||||||
open_time,
|
open_time,
|
||||||
used,
|
used,
|
||||||
usescsv,
|
usescsv,
|
||||||
webhook_url
|
webhook_url,
|
||||||
|
custom_url
|
||||||
)
|
)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);
|
||||||
"""
|
"""
|
||||||
insert_to_pg(q, res.fetchall())
|
insert_to_pg(q, res.fetchall())
|
||||||
# WITHDRAW HASH CHECK
|
# WITHDRAW HASH CHECK
|
||||||
|
Reference in New Issue
Block a user