mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-02-19 10:07:51 +00:00
* [state machine] Allow querying of state properties * [purchasing] use new state machine * [state machine] remove old state machine implementation * [purchasing] remove duplication in error handling
11 lines
286 B
Nim
11 lines
286 B
Nim
import ../statemachine
|
|
|
|
type PurchaseFinished* = ref object of PurchaseState
|
|
|
|
method `$`*(state: PurchaseFinished): string =
|
|
"finished"
|
|
|
|
method run*(state: PurchaseFinished, machine: Machine): Future[?State] {.async.} =
|
|
let purchase = Purchase(machine)
|
|
purchase.future.complete()
|