mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-27 01:40:44 +00:00
10 lines
230 B
Nim
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()
|