diff --git a/README.md b/README.md
index 3a6f1e4..c24ee49 100644
--- a/README.md
+++ b/README.md
@@ -7,15 +7,8 @@ The TipJar extension allows you to integrate Bitcoin Lightning (and on-chain) ti
How to set it up
1. Simply create a new Tip Jar with the desired details (onchain and webhook optional):
-
+ 
1. Share the URL you get from this little button:
-
-
-A note on webhooks
-
-The `description` field of the message POSTed to your webhook will be in the following format:
- * `{length of the name}|{name}{message}`
-
-You can split along the first `|`. This will give you the index at which to split between the name of the tipper and the message of the tipper.
+ 
And that's it already! Let the sats flow!
diff --git a/views_api.py b/views_api.py
index 302a265..9bb65e1 100644
--- a/views_api.py
+++ b/views_api.py
@@ -65,13 +65,12 @@ async def api_create_tip(data: createTips):
if not name:
name = "Anonymous"
- # Ensure that description string can be split reliably
- description = f"{len(name)}|{name}{message}"
charge_id = await create_charge(
data={
"amount": sats,
"webhook": tipjar.webhook or "",
- "description": description,
+ "name": name,
+ "description": message,
"onchainwallet": tipjar.onchain or "",
"lnbitswallet": tipjar.wallet,
"completelink": "/tipjar/" + str(tipjar_id),
@@ -136,7 +135,6 @@ async def api_update_tip(
)
if tip.wallet != wallet.wallet.id:
-
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN, detail="Not your tip."
)
@@ -178,9 +176,7 @@ async def api_update_tipjar(
@tipjar_ext.delete("/api/v1/tips/{tip_id}")
-async def api_delete_tip(
- tip_id: str, wallet: WalletTypeInfo = Depends(get_key_type)
-):
+async def api_delete_tip(tip_id: str, wallet: WalletTypeInfo = Depends(get_key_type)):
"""Delete the tip with the given tip_id"""
tip = await get_tip(tip_id)
if not tip:
@@ -200,8 +196,7 @@ async def api_delete_tip(
@tipjar_ext.delete("/api/v1/tipjars/{tipjar_id}")
async def api_delete_tipjar(
- tipjar_id: int,
- wallet: WalletTypeInfo = Depends(get_key_type)
+ tipjar_id: int, wallet: WalletTypeInfo = Depends(get_key_type)
):
"""Delete the tipjar with the given tipjar_id"""
tipjar = await get_tipjar(tipjar_id)
@@ -210,7 +205,6 @@ async def api_delete_tipjar(
status_code=HTTPStatus.NOT_FOUND, detail="No tipjar with this ID!"
)
if tipjar.wallet != wallet.wallet.id:
-
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN,
detail="Not authorized to delete this tipjar!",