Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Adds withdraw to tpos #19

Merged
merged 39 commits into from
Nov 9, 2023
Merged

WIP Adds withdraw to tpos #19

merged 39 commits into from
Nov 9, 2023

Conversation

arcbtc
Copy link
Member

@arcbtc arcbtc commented Sep 27, 2023

No description provided.

lnurl.py Outdated
}
return {
"tag": "withdrawRequest",
"callback": request.url_for(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this now is str(request.url_for(...))

tasks.py Outdated
@@ -20,7 +20,7 @@ async def wait_for_paid_invoices():


async def on_invoice_paid(payment: Payment) -> None:
if payment.extra.get("tag") != "tpos" or payment.extra.get("tipSplitted"):
if payment.extra.get("tag") != "tpos":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the tipSplitted or tpos will make double tips on payment

@@ -52,7 +52,7 @@ async def on_invoice_paid(payment: Payment) -> None:
wallet_id=wallet_id,
amount=int(tipAmount),
internal=True,
memo="tpos tip",
memo=f"tpos tip",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the f

this.updateTPos(wallet, data)
} else {
this.createTPoS(wallet, data)
if(self.formDialog.data.id != undefined){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this here?

manifest.json Outdated
@@ -2,7 +2,7 @@
"repos": [
{
"id": "tpos",
"organisation": "lnbits",
"organisation": "arcbtc",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are this changes ok? your this started in an old tpos repo, and got smuggled here?

README.md Outdated
@@ -1,5 +1,4 @@
# TPoS - <small>[LNbits](https://github.com/lnbits/lnbits) extension</small>
<small>For more about LNBits extension check [this tutorial](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions)</small>
# TPoS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are this changes ok? your this started in an old tpos repo, and got smuggled here?

@talvasconcelos
Copy link
Collaborator

Steps to test:

  1. Checkout this PR
  2. Create or edit a TPOS and activate the Withdraw option
  3. Go into ATM mode and try to withdraw


db = Database("ext_tpos")


class LNURLErrorResponseHandler(APIRoute):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would handle all the /tpos API calls like LNURLErrorResponses right?

btw. i saw that handleer already multiple times in extensions, would it make sense to offer it from core in helpers.py or lnurl.py?

__init__.py Outdated Show resolved Hide resolved
lnurl.py Outdated Show resolved Hide resolved
@arcbtc arcbtc merged commit 1c83125 into lnbits:main Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants