handle execution error 'NO'

This commit is contained in:
Tim
2024-04-15 18:30:02 -04:00
parent 03bb6a7b97
commit f13ef9d55e

View File

@@ -172,7 +172,7 @@ class Order:
def complete(self, final_state: SwapOrderState): def complete(self, final_state: SwapOrderState):
""" updates the static order record with its final values, then deletes all its dynamic blockstate and removes the Order from the actives list """ """ updates the static order record with its final values, then deletes all its dynamic blockstate and removes the Order from the actives list """
assert final_state in (SwapOrderState.Canceled, SwapOrderState.Expired, SwapOrderState.Filled) assert final_state in (SwapOrderState.Canceled, SwapOrderState.Expired, SwapOrderState.Filled, SwapOrderState.Error)
status = self.status.copy() status = self.status.copy()
status.state = final_state status.state = final_state
if self.is_open: if self.is_open: