comit-network / app

Moved to
https://github.com/comit-network/taker-ui
MIT License
1 stars 1 forks source link

Refactor State machine into classes #22

Closed yosriady closed 4 years ago

yosriady commented 4 years ago

https://github.com/davidkpiano/xstate/tree/master/packages/xstate-fsm

Use https://github.com/paybase/machine

bonomat commented 4 years ago

@yosriady : do you think this is still relevant if we do comit-network/comit-js-sdk#94 ?

yosriady commented 4 years ago

@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.

yosriady commented 4 years ago

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.)