2022-10-25 15:10:35 +11:00

10 lines
230 B
Nim

import ../statemachine
type PurchaseStarted* = ref object of PurchaseState
method enter*(state: PurchaseStarted) =
without purchase =? (state.context as Purchase):
raiseAssert "invalid state"
purchase.future.complete()