Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
00f9f69
fix: download archive file `async`
motorina0 Jan 29, 2024
f52d7c5
feat: add `pay_link` property
motorina0 Jan 30, 2024
d9ef1a9
feat: basic install using internal wallet for payment
motorina0 Jan 30, 2024
60f2d3c
fix: pop-up issues
motorina0 Feb 1, 2024
e8d6c87
chore: refactor
motorina0 Feb 1, 2024
6a5f1f6
feat: detect paid extensions
motorina0 Feb 1, 2024
dd417ce
fix: payment check
motorina0 Feb 1, 2024
60cf339
feat: small stuff
motorina0 Feb 1, 2024
cdd8436
feat: show external invoice
motorina0 Feb 1, 2024
9afecb5
fix: regression for extension install
motorina0 Feb 1, 2024
f8277c9
feat: store previos successful payments
motorina0 Feb 2, 2024
3fc46eb
refactor: simplify, almost works
motorina0 Feb 2, 2024
38a5c5f
chore: gugu gaga
motorina0 Feb 5, 2024
cf1efd2
fix: pay and install
motorina0 Feb 5, 2024
46daf44
fix: do not pay invoice on the back-end
motorina0 Feb 5, 2024
d443dc2
chore: code clean-up
motorina0 Feb 5, 2024
75f6328
feat: basic websocker listener
motorina0 Feb 6, 2024
827e5dd
feat: use websocket to watch for invoice payment
motorina0 Feb 6, 2024
24d42ff
feat: remember hanging invoices
motorina0 Feb 6, 2024
1e49bb4
refactor: extract `localStorage` methods
motorina0 Feb 6, 2024
4ea9272
chore: code format
motorina0 Feb 6, 2024
4bc4dda
chore: code clean-up after test
motorina0 Feb 6, 2024
6e8ba5d
feat: remember previous payment_hashes
motorina0 Feb 6, 2024
ae4481a
chore: code format
motorina0 Feb 6, 2024
b2bff78
refactor: rename `ExtensionPaymentInfo` to `ReleasePaymentInfo`
motorina0 Feb 6, 2024
84deb4c
refactor: method rename
motorina0 Feb 6, 2024
b4026b8
fix: release version matters now
motorina0 Feb 7, 2024
219d844
chore: code format
motorina0 Feb 7, 2024
0b5c50d
refactor: method rename
motorina0 Feb 7, 2024
c21a8f6
refactor: extract method `_restore_payment_info`
motorina0 Feb 7, 2024
093c1a2
refactor: extract method
motorina0 Feb 7, 2024
c026099
chore: rollback `CACHE_VERSION`
motorina0 Feb 7, 2024
8b92004
chore: code format
motorina0 Feb 7, 2024
f4e3866
feat: i18n
motorina0 Feb 7, 2024
33a015b
chore: update bundle
motorina0 Feb 7, 2024
91e9efe
refactor: public method name
motorina0 Feb 7, 2024
73eec66
chore: code format
motorina0 Feb 7, 2024
3951a40
Merge branch 'dev'
arcbtc Feb 7, 2024
5319055
fix: websocket connection
motorina0 Feb 8, 2024
6a28868
Update installation.md (#2259)
arcbtc Feb 11, 2024
451f8d7
Update installation.md (#2260)
arcbtc Feb 11, 2024
7681dfc
fix: try to fix `openapi` error
motorina0 Feb 12, 2024
81f6e99
Merge branch 'main' of https://github.com/lnbits/lnbits
arcbtc Feb 22, 2024
4a32ec7
Merge branch 'main' into paid_extensions
arcbtc Feb 22, 2024
bfe07cb
Merge branch 'dev' into paid_extensions
arcbtc Feb 22, 2024
c5a5a94
chore: bundle
arcbtc Feb 22, 2024
1fa7da6
Merge branch 'paid_extensions' of https://github.com/lnbits/lnbits in…
arcbtc Feb 22, 2024
18869b8
chore:bundle
arcbtc Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lnbits/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async def check_installed_extensions(app: FastAPI):

for ext in installed_extensions:
try:
installed = check_installed_extension_files(ext)
installed = await check_installed_extension_files(ext)
if not installed:
await restore_installed_extension(app, ext)
logger.info(
Expand Down Expand Up @@ -252,14 +252,14 @@ async def build_all_installed_extensions_list(
]


def check_installed_extension_files(ext: InstallableExtension) -> bool:
async def check_installed_extension_files(ext: InstallableExtension) -> bool:
if ext.has_installed_version:
return True

zip_files = glob.glob(os.path.join(settings.lnbits_data_folder, "zips", "*.zip"))

if f"./{str(ext.zip_path)}" not in zip_files:
ext.download_archive()
await ext.download_archive()
ext.extract_archive()

return False
Expand Down
10 changes: 8 additions & 2 deletions lnbits/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ async def install_extension(
return False, "No release selected"

data = CreateExtension(
ext_id=extension, archive=release.archive, source_repo=release.source_repo
ext_id=extension,
archive=release.archive,
source_repo=release.source_repo,
version=release.version,
)
await _call_install_extension(data, url, admin_user)
click.echo(f"Extension '{extension}' ({release.version}) installed.")
Expand Down Expand Up @@ -445,7 +448,10 @@ async def update_extension(
click.echo(f"Updating '{extension}' extension to version: {release.version }")

data = CreateExtension(
ext_id=extension, archive=release.archive, source_repo=release.source_repo
ext_id=extension,
archive=release.archive,
source_repo=release.source_repo,
version=release.version,
)

await _call_install_extension(data, url, admin_user)
Expand Down
1 change: 1 addition & 0 deletions lnbits/core/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ async def add_installed_extension(
dict(ext.installed_release) if ext.installed_release else None
),
"dependencies": ext.dependencies,
"payments": [dict(p) for p in ext.payments] if ext.payments else None,
}

version = ext.installed_release.version if ext.installed_release else ""
Expand Down
Loading