Skip to content

Pay invoice button does not appear when needed after restore #586

@BraCR10

Description

@BraCR10

Describe the bug
After restoring a user or change mostro instance the order shows the correct status and the message "Pay Invoice" header, but the action button required to actually pay the hold invoice is missing, leaving the trade stuck from the user's side.

To Reproduce
Steps to reproduce the behavior:

  1. Create a sell order with any user.
  2. Generate a new user or use another device and take the order by giving the invoice.
  3. Restore to the user who created the order, this user should pay the hold invoice.
  4. "Pay invoice" button does not appear

Expected behavior
After restore, the seller should see the "Pay Invoice" button for any order that is waiting for payment, with the correct hold invoice ready to be paid.The restored state should be functionally equivalent to the original device's state for that order.

Screenshots
Image

Smartphone (please complete the following information):

  • Device: any

Additional context

The restore flow rebuilds orders and disputes using only the data returned by the restore-session event. During restore, all historical gift wrap messages that may arrive on the relays are explicitly ignored for state purposes.

Possible causes :

  • The restore-session protocol response does not include the hold invoice for orders. This means there is currently no information from Mostro that the client can use to reconstruct the invoice during restore.
  • Historical events gift wraps (which originally carried the invoice) are intentionally not consumed during restore, so even if a relay still has them, they are not used to build the state.
  • As a result, the app effectively knows that the seller "should pay an invoice" , but it does not actually know which hold invoice to pay, so the user-facing flow cannot be completed.

Maybe a protocol decision is likely needed about whether the restore-session payload should expose the hold invoice, or whether the client should obtain it through some other mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions