commit 768dc523f885d6978799dce2f0ab16435cc3fad4
parent 1c465883cb1e764b5a3167f254c6ab15da2262f9
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 8 Apr 2023 18:19:00 +0200
redo diagram in dot
Diffstat:
3 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -55,6 +55,8 @@ arch-api.png: arch-api.dot
dot -Tpng arch-api.dot > arch-api.png
transaction-common-states.png: transaction-common-states.dot
dot -Tpng transaction-common-states.dot > transaction-common-states.png
+transaction-withdrawal-states.png: transaction-withdrawal-states.dot
+ dot -Tpng transaction-withdrawal-states.dot > transaction-withdrawal-states.png
coin.png: coin.dot
dot -Tpng coin.dot > coin.png
deposit.png: deposit.dot
@@ -62,7 +64,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
+diagrams: arch-api.png coin.png deposit.png reserve.png transaction-common-states.png transaction-withdrawal-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
@@ -224,7 +224,7 @@ Transaction Type: Withdrawal
Only once all coins were spent, the withdraw is fully removed.
-.. image:: ../transaction-withdrawal-states.svg
+.. image:: ../transaction-withdrawal-states.png
:width: 800
diff --git a/transaction-withdrawal-states.dot b/transaction-withdrawal-states.dot
@@ -0,0 +1,47 @@
+digraph G {
+
+ initial[label="", shape="circle"];
+ pending_brr[label="pending(bank-register-reserve)"];
+ pending_bc[label="pending(bank-confirming)"];
+ pending_ewr[label="pending(exchange-wait-reserve)"];
+ pending_wc[label="pending(withdrawing-coins)"];
+ pending_kyc[label="pending(kyc-required)"];
+ pending_aml[label="pending(aml-required)"];
+ pending_frz[label="pending(aml-frozen)"];
+ done[label="done", shape="box"];
+ aborted_b2w[label="aborted(bank-to-wallet)", shape="box"];
+ aborted_w2b[label="aborted(wallet-to-bank)", shape="box"];
+ aborted_aw[label="aborted(after-wired)", shape="box"];
+ aborted_pw[label="aborted(partially-withdrawn)", shape="box"];
+ aborting_w2b[label="aborting(wallet-to-bank)"];
+
+ subgraph {
+ rank = same; pending_brr; pending_bc; pending_ewr; pending_wc; done;
+ }
+
+ subgraph {
+ rank = same; aborted_b2w; aborted_w2b; aborted_aw; aborted_pw;
+ }
+
+ initial->pending_brr [label="bank integrated withdraw"];
+ initial->pending_ewr [label="manual withdraw"];
+ pending_brr->pending_bc;
+ pending_bc->pending_ewr;
+ pending_ewr->pending_wc;
+ pending_wc->pending_kyc;
+ pending_wc->pending_aml;
+ pending_kyc->pending_wc [color="blue",label="kyc"];
+ pending_aml->pending_wc [color="purple",label="approve"];
+ pending_aml->pending_frz [color="purple",label="freeze"];
+ pending_frz->pending_wc [color="purple",label="approve"];
+ pending_kyc->aborted_pw [color="blue", label="abort"];
+ pending_aml->aborted_pw [color="blue", label="abort"];
+ pending_frz->aborted_pw [color="blue", label="abort"];
+ pending_brr->aborted_b2w [color="blue", label="abort"];
+ pending_bc->aborting_w2b [color="blue", label="abort"];
+ aborting_w2b->aborted_w2b;
+ pending_ewr->aborted_aw [color="blue", label="abort"];
+ pending_wc->aborted_pw [color="blue", label="abort"];
+
+ pending_wc->done;
+}