nim-codex/codex/purchasing/states/finished.nim

13 lines
301 B
Nim

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