refactor: remove extra param
This commit is contained in:
+1
-1
@@ -510,7 +510,7 @@ def register_async_tasks(app: FastAPI) -> None:
|
||||
register_invoice_listener(invoice_queue, "core")
|
||||
|
||||
async def dispatch_extension_invoice_paid(payment) -> None:
|
||||
await dispatch_wasm_invoice_paid(app, payment)
|
||||
await dispatch_wasm_invoice_paid(payment)
|
||||
|
||||
core_app_extra.dispatch_extension_invoice_paid = dispatch_extension_invoice_paid
|
||||
create_permanent_task(lambda: wait_for_paid_invoices(invoice_queue))
|
||||
|
||||
@@ -244,7 +244,6 @@ def _add_wasm_extension_api_route(
|
||||
try:
|
||||
payload = await _read_api_payload(request, path_params)
|
||||
return await invoke_wasm_export(
|
||||
app,
|
||||
extension.id,
|
||||
export_name,
|
||||
payload,
|
||||
|
||||
@@ -7,8 +7,6 @@ from collections.abc import Mapping
|
||||
from functools import lru_cache
|
||||
from typing import Any
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
from lnbits.core.crud.extensions import get_installed_extension
|
||||
from lnbits.core.db import core_app_extra
|
||||
|
||||
@@ -18,7 +16,6 @@ from .runtime import ExtensionAPIHost
|
||||
|
||||
|
||||
async def invoke_wasm_extension_export(
|
||||
app: FastAPI,
|
||||
ext_id: str,
|
||||
export_name: str,
|
||||
payload: Mapping[str, Any] | None = None,
|
||||
|
||||
@@ -2,7 +2,6 @@ import asyncio
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
from fastapi import FastAPI
|
||||
from loguru import logger
|
||||
|
||||
from lnbits.core.crud import (
|
||||
@@ -107,7 +106,7 @@ async def wait_for_paid_invoices(invoice_paid_queue: asyncio.Queue) -> None:
|
||||
await core_app_extra.dispatch_extension_invoice_paid(payment)
|
||||
|
||||
|
||||
async def dispatch_wasm_invoice_paid(app: FastAPI, payment: Any) -> None:
|
||||
async def dispatch_wasm_invoice_paid(payment: Any) -> None:
|
||||
extension_id = _payment_extension_id(payment)
|
||||
if not extension_id:
|
||||
return
|
||||
@@ -131,7 +130,6 @@ async def dispatch_wasm_invoice_paid(app: FastAPI, payment: Any) -> None:
|
||||
from lnbits.core.extensions.wasm import invoke_wasm_extension_export
|
||||
|
||||
await invoke_wasm_extension_export(
|
||||
app,
|
||||
extension.id,
|
||||
export_name,
|
||||
_wasm_invoice_paid_payload(payment),
|
||||
|
||||
Reference in New Issue
Block a user