summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--design-documents/037-wallet-transactions-lifecycle.rst72
2 files changed, 54 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 771a04e2..7cac38f9 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,8 @@ transaction-refresh-states.png: transaction-refresh-states.dot
dot -Tpng transaction-refresh-states.dot > transaction-refresh-states.png
transaction-tip-states.png: transaction-tip-states.dot
dot -Tpng transaction-tip-states.dot > transaction-tip-states.png
+transaction-deposit-states.png: transaction-deposit-states.dot
+ dot -Tpng transaction-deposit-states.dot > transaction-deposit-states.png
coin.png: coin.dot
dot -Tpng coin.dot > coin.png
deposit.png: deposit.dot
@@ -72,7 +74,7 @@ deposit.png: deposit.dot
reserve.png: reserve.dot
dot -Tpng reserve.dot > reserve.png
-diagrams: arch-api.png coin.png deposit.png reserve.png transaction-common-states.png transaction-withdrawal-states.png transaction-payment-states.png transaction-refund-states.png transaction-refresh-states.png transaction-tip-states.png
+diagrams: arch-api.png coin.png deposit.png reserve.png transaction-common-states.png transaction-withdrawal-states.png transaction-payment-states.png transaction-refund-states.png transaction-refresh-states.png transaction-tip-states.png transaction-deposit-states.png
# The html-linked builder does not support caching, so we
diff --git a/design-documents/037-wallet-transactions-lifecycle.rst b/design-documents/037-wallet-transactions-lifecycle.rst
index f9db090f..1b1da800 100644
--- a/design-documents/037-wallet-transactions-lifecycle.rst
+++ b/design-documents/037-wallet-transactions-lifecycle.rst
@@ -517,7 +517,7 @@ the same as if the double-spending transaction had been deleted by the user.
fresh coins are preserved.
.. image:: ../transaction-refresh-states.png
- :width: 400
+ :width: 250
@@ -602,49 +602,79 @@ Transaction Type: Deposit
* ``initial``
- Deposit is created, effective amount is removed from balance
+ This is the initial state where the user is asked to specify the target bank account and amount to be deposited.
- * ``[processed-success] => pending(submit-deposit)``: reserve created
- * ``[action:abort] => aborted``
+ * ``[action:form-data] => pending(submit-deposit)``: user supplied deposit request details
-* ``pending(submit-deposit)``
+* ``pending(deposit)``
-Submit coin by coin (or in bulk groups) until deposit is completed.
+ We deposit the amount coin-by-coin (or in bulk groups) until deposit is completed.
- * ``[action:abort] => aborting(refund)``
+ * ``[action:suspend] => suspended(submit-deposit)``
* ``[processed-success] => pending(track)``
- * ``[processed-error] => aborting(refresh)``
+ * ``[processed-failure] => aborting(refund)``
+
+* ``suspended(deposit)``
+
+ The user suspended our ongoing deposit operation.
+
+ * ``[action:resume] => pending(deposit)``
+ * ``[action:abort] => aborting(refund)``
* ``pending(track)``
-All the coins were submitted, waiting to be wired.
+ All the coins were submitted, waiting to be wired.
* ``[poll-success] => done``
- * ``[action:abort] => aborting(partially-wired)``
+ * ``[action:abort] => aborting(refund)``
* ``aborting(refund)``
-Trying to get the deposited amount back from the exchange.
+ Wallet should try to get the deposited amount back from the exchange (by submitting a refund).
- ``[processed-success] => aborting(refresh)``
- ``[processed-error] => aborting(refresh)`` XXX Shouldn't this be some error state?
-(??) why it moves to the same state?
+ * ``[action:suspend] => suspended(refund)``
+ * ``[processed-success] => aborting(refresh)``
+ * ``[processed-error] => aborting(refresh)``: Even if the refund attempt failed, maybe the deposit failed as well and we can still succeed with a refresh.
-* ``aborting(partially-wired)``
+* ``suspended(refund)``
-Should cancel all pending wire transfer.
-
- ``[processed-success] => aborting(refund)``
- ``[processed-error] => aborting(refresh)`` XXX Shouldn't this be some error state?
+ The user suspended us while we were trying to get a refund.
+ * ``[action:resume] => aborting(refund)``
+ * ``[action:delete] => deleted``
* ``aborting(refresh)``
- ``[processed-success] => aborted``
- ``[processed-error] => failed``
+ * ``[action:suspend] => suspended(refresh)``
+ * ``[processed-success] => aborted``
+ * ``[processed-error] => failed``
+
+* ``suspended(refresh)``
+
+ The user suspended us while we were trying to do the refresh.
+
+ * ``[action:resume] => aborting(refresh)``
+ * ``[action:delete] => deleted``
+
+* ``aborted``
+
+ The operation was aborted, some funds may have been lost (to fees or deposited anyway).
+
+ * ``[action:delete] => deleted``
* ``done``
+ The deposit operation completed.
+
+ * ``[action:delete] => deleted``
+
+* ``deleted``
+
+ All memory of the deposit operation is lost.
+
+.. image:: ../transaction-deposit-states.png
+ :width: 400
+
Transaction Type: Peer Push Debit
---------------------------------