Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

[Bug]: no feedback about invalid LN invoice #54

Open
tril0byte opened this issue Nov 11, 2022 · 1 comment
Open

[Bug]: no feedback about invalid LN invoice #54

tril0byte opened this issue Nov 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@tril0byte
Copy link

Describe the bug

when the invoice is pasted and it's wrong there's an error written to the log but not provided to the user. Actually the log is pretty clear saying "Must include only alpha numeric characters", this message should be presented to the user in red text near the field that contains the error.

Reproduce

  1. Log into Citadel
  2. click Lightning
  3. click Send
  4. paste an invoice that contains a space in it. Animation of a line moving back and forth will occur with no feedback about what is wrong.

Citadel version

0.1.3

Operating system

Debian

Log output

middleware         |   InternalServerError: Must include only alpha numeric characters.
middleware         |       at Object.throw (/app/node_modules/koa/lib/context.js:97:11)
middleware         |       at Module.isAlphanumeric (file:///app/node_modules/@runcitadel/utils/lib/typeHelper.js:15:18)
middleware         |       at file:///app/routes/v1/lnd/lightning.js:45:16
middleware         |       at dispatch (/app/node_modules/koa-compose/index.js:42:32)
middleware         |       at file:///app/middlewares/auth.js:44:15
middleware         |       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@tril0byte tril0byte added the bug Something isn't working label Nov 11, 2022
@tril0byte
Copy link
Author

it was actually a newline character that when pasting got turned into a space (showed as %20 in GET /api/v1/lnd/lightning/invoice?paymentRequest=). actually I don't know if the BOLTs say you need to support multi-line invoices but that would make some kind of sense, maybe the wallet should merge the lines together if this happens, but that might be more complicated to implement and an error would have worked for me.

@AaronDewes AaronDewes transferred this issue from runcitadel/citadel Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant