You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
We need a way for wallet GUI applications to map order execution states (whatever those may be) to given GUI visualizations
Problem
The problem being faced here is one of potential DX confusion cause by duplicate concepts.
The story of a PFI coming to tbdex for the first time may go as such:
"Okay I'm a PFI so I need to define my own set of OrderStatus status'"
"Well, logically that means one of my OrderStatus status' will be something like COMPLETED or maybe EXECUTED or SUCCESSFULLY_EXECUTED"
"Oh but what's this Close thing? Oh I need to also include a Close message at the end of my order execution even though I already have defined my OrderStatus for that state"
It's entirely possible the above is acceptable in that there does not exist any undoubtedly better alternatives, but nevertheless I think it would be a benefit to explore alternatives if only to rule out the alternatives.
Proposals
Well-defined OrderStatus status enums
One such proposal is in the ticket here #256. Which is, we define a set of well-known OrderStatus status values which all PFIs must implement, with the expectation PFIs may also implement additional OrderStatus statue values (unique to their given situation). Those status' may be, for example, as simple as PENDING, SUCCESSFUL and FAILED. In this proposal, we may no longer have a need for the Close message, in which case we would remove the duplication.
Application-specific OrderStatus specifications
We may choose to rollup (so-to-speak) the responsibility of defining OrderStatus state machines into application-specific use cases. For example, one could imagine a tbdex-application specification for blockchain exchanges wherein the order execution is the identical state machine across all blockchain exchanges, and then a different specification for credit cards.
The text was updated successfully, but these errors were encountered:
After having a read through this and the other issue, it seems that there is not an existing pain point that this will address. The DX confusion mentioned is possible even with the proposed solutions. A PFI could send a OrderStatus.SUCCESSFUL followed by an OrderStatus.FAILED, which is an application level error, not something that can be controlled by the protocol. In fact, keeping Close as well as OrderStatus at least allows us to put guard rails in by not allowing subsequent OrderStatuses after a Close has been sent.
Also echoing @mistermoe's sentiment that tbdex should not attempt to solve state machines for a bunch of different payment rails, which are PFI dependent.
Originally ideated upon here #255 (comment)
Requirement
We need a way for wallet GUI applications to map order execution states (whatever those may be) to given GUI visualizations
Problem
The problem being faced here is one of potential DX confusion cause by duplicate concepts.
The story of a PFI coming to tbdex for the first time may go as such:
OrderStatus
status'"OrderStatus
status' will be something likeCOMPLETED
or maybeEXECUTED
orSUCCESSFULLY_EXECUTED
"Close
thing? Oh I need to also include aClose
message at the end of my order execution even though I already have defined myOrderStatus
for that state"It's entirely possible the above is acceptable in that there does not exist any undoubtedly better alternatives, but nevertheless I think it would be a benefit to explore alternatives if only to rule out the alternatives.
Proposals
Well-defined
OrderStatus
status enumsOne such proposal is in the ticket here #256. Which is, we define a set of well-known
OrderStatus
status values which all PFIs must implement, with the expectation PFIs may also implement additionalOrderStatus
statue values (unique to their given situation). Those status' may be, for example, as simple asPENDING
,SUCCESSFUL
andFAILED
. In this proposal, we may no longer have a need for theClose
message, in which case we would remove the duplication.Application-specific
OrderStatus
specificationsWe may choose to rollup (so-to-speak) the responsibility of defining
OrderStatus
state machines into application-specific use cases. For example, one could imagine a tbdex-application specification for blockchain exchanges wherein the order execution is the identical state machine across all blockchain exchanges, and then a different specification for credit cards.The text was updated successfully, but these errors were encountered: