# Restoring unconfirmed steps

**URL:** <https://discuss.prosemirror.net/t/restoring-unconfirmed-steps/2024>\
**Category:** Uncategorized\
**Created:** [June 22, 2019, 10:12am UTC](https://discuss.prosemirror.net/t/restoring-unconfirmed-steps/2024 "2019-06-22T10:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![optimistiks](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/optimistiks/32/928_2.png) [@optimistiks](https://discuss.prosemirror.net/u/optimistiks)\
**Post date:** [June 22, 2019, 10:12am UTC](https://discuss.prosemirror.net/t/restoring-unconfirmed-steps/2024/1 "2019-06-22T10:12:33Z")

</div>

I have an editor where I use the `collab` plugin to send the steps to the authority to support the collaborative editing use case. If I fail to connect to the authority, I want to save the steps that I have in `sendable` (`collab.sendableSteps()`) to the `localStorage`, to be able to close the app, come back, and have those steps restored and sent to authority again.

However, when I deserialize the steps from the `localStorage` and apply them to the document using `step.apply`, they count as “confirmed”, and they are not in the `sendable` anymore. How can I replay the steps on a document while preserving the “unconfirmed” state for them?

---

<div class="post-metadata">

**Author:** ![optimistiks](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/optimistiks/32/928_2.png) [@optimistiks](https://discuss.prosemirror.net/u/optimistiks)\
**Post date:** [June 22, 2019, 10:46am UTC](https://discuss.prosemirror.net/t/restoring-unconfirmed-steps/2024/2 "2019-06-22T10:46:38Z")

</div>

Nevermind, instead of using `step.apply()` I should’ve added my deserialized steps to a new transaction using `tr.step()` and dispatched it. Then the transaction is processed by the `collab` plugin as usual, and the steps are added to unconfirmed.
