Closed yosriady closed 4 years ago
@yosriady : do you think this is still relevant if we do comit-network/comit-js-sdk#94 ?
@bonomat
Hard to say. I believe it's still relevant because the app would need to do its own business logic, in which case it would need a way to either hook onto the SDK state machine or roll its own.
The swap status in the protocol and the swap 'status' from the app's perspective could be very different, and there may not be a 1-to-1 mapping between the two.
I think we might get a lot more clarity if we implement both to see if there are sufficient overlaps which can be extracted to the SDK (or not.)
runTakerNextStep
andparseTakerSwapStatus
https://github.com/davidkpiano/xstate/tree/master/packages/xstate-fsm
Use https://github.com/paybase/machine