Skip to content

[bug]: creating an invoice with a negative expiry defaults to 86400 seconds #2261

Description

@bufo24

Background

When creating an invoice using v1/taproot-assets/channels/invoice using a negative expiry value in seconds, I get an invoice with an expiry of 86400 seconds.

Your environment

tapd v0.8.0
  • any other relevant environment details

Steps to reproduce

Make an invoice using this body:

{
	"asset_amount": "1000000",
	"group_key": "...",
	"invoice_request": {"expiry": -1}
}

Expected behavior

I would expect the RPC to throw an error, since it isn't possible to make an invoice with a negative expiry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvoices

    Type

    No type

    Projects

    Status
    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions