mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-02 22:14:15 +00:00
f459a2c6f6
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
21 lines
476 B
Nim
21 lines
476 B
Nim
import pkg/chronicles
|
|
import pkg/chronos
|
|
import ../statemachine
|
|
import ../salesagent
|
|
import ./errorhandling
|
|
|
|
logScope:
|
|
topics = "marketplace sales ignored"
|
|
|
|
type
|
|
SaleIgnored* = ref object of ErrorHandlingState
|
|
|
|
method `$`*(state: SaleIgnored): string = "SaleIgnored"
|
|
|
|
method run*(state: SaleIgnored, machine: Machine): Future[?State] {.async.} =
|
|
let agent = SalesAgent(machine)
|
|
let context = agent.context
|
|
|
|
if onCleanUp =? context.onCleanUp:
|
|
await onCleanUp()
|