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

Inconsistent behaviour when creating TPOS via API or GUI #72

Closed
lightningcheckout opened this issue Feb 29, 2024 · 1 comment · Fixed by #73
Closed

Inconsistent behaviour when creating TPOS via API or GUI #72

lightningcheckout opened this issue Feb 29, 2024 · 1 comment · Fixed by #73
Assignees

Comments

@lightningcheckout
Copy link

When I create a TPOS via API with the following request (without TIP options):

{
  "wallet": "63230a322de94c21aa31539eb3f532ae",
  "name": "WithoutTips",
  "currency": "EUR"
}

The result is (with code 201)

{
  "id": "oCDkj2GxJdC8wkXPPhTDfZ",
  "wallet": "63230a322de94c21aa31539eb3f532ae",
  "name": "WithoutTips",
  "currency": "EUR",
  "tip_options": null,
  "tip_wallet": null,
  "withdrawlimit": null,
  "withdrawpin": null,
  "withdrawamt": 0,
  "withdrawtime": 0,
  "withdrawtimeopt": null,
  "withdrawbtwn": 10,
  "withdrawpremium": null,
  "withdrawpindisabled": false,
  "items": "[]"
}

When you now try to open this TPOS, it won't work. The error you got:
TypeError: tip_options is null

I have created a new TPOS, but now from the GUI and again without TIP options.

When I retrieve the TPOS's in the account, the result is:

[
  {
    "id": "oCDkj2GxJdC8wkXPPhTDfZ",
    "wallet": "63230a322de94c21aa31539eb3f532ae",
    "name": "WithoutTips",
    "currency": "EUR",
    "tip_options": null,
    "tip_wallet": null,
    "withdrawlimit": null,
    "withdrawpin": null,
    "withdrawamt": 0,
    "withdrawtime": 0,
    "withdrawtimeopt": null,
    "withdrawbtwn": 10,
    "withdrawpremium": null,
    "withdrawpindisabled": false,
    "items": "[]"
  },
  {
    "id": "6h9UhwjVeLoV2JirgCHYr2",
    "wallet": "63230a322de94c21aa31539eb3f532ae",
    "name": "test",
    "currency": "EUR",
    "tip_options": "[]",
    "tip_wallet": "",
    "withdrawlimit": null,
    "withdrawpin": null,
    "withdrawamt": 0,
    "withdrawtime": 0,
    "withdrawtimeopt": "",
    "withdrawbtwn": 10,
    "withdrawpremium": null,
    "withdrawpindisabled": false,
    "items": "[]"
  }
]

The second one, is via GUI. The tip_options and tip_wallet are stored in a different way then via the API.
Via API to me seems the best way, but that makes the TPOS not working.

This was just tested on legend (LNbits version: 0.12.0)

@lightningcheckout
Copy link
Author

lightningcheckout commented Feb 29, 2024

BTW, creating the POS from API with tip_options="[]", tip_wallet="" is a workaround for now.

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 a pull request may close this issue.

2 participants