From b59a9caf64ebb3a93f79bd27936d8c7dcd39957e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 7 May 2023 22:40:11 +0200 Subject: DD37: address code/spec mismatches --- .../037-wallet-transactions-lifecycle.rst | 47 +++++++++------------- 1 file changed, 20 insertions(+), 27 deletions(-) (limited to 'design-documents') diff --git a/design-documents/037-wallet-transactions-lifecycle.rst b/design-documents/037-wallet-transactions-lifecycle.rst index 0b6e2b13..7d9f9b6b 100644 --- a/design-documents/037-wallet-transactions-lifecycle.rst +++ b/design-documents/037-wallet-transactions-lifecycle.rst @@ -193,12 +193,12 @@ Transaction Type: Withdrawal The wallet **may** occasionally (after some initial delay, especially on failures from the bank-poll to return any result) long-poll for the reserve status and, if successful, may then directly jump to - ``pending(withdrawing-coins)`` if the reserve is filled even if the poll at + ``pending(withdraw-coins)`` if the reserve is filled even if the poll at the bank did not return success or failure. * ``[bank-poll-success] => pending(exchange-wait-reserve)`` * ``[bank-aborted] => aborted``: Bank denied the operation. - * ``[exchange-poll-success] => pending(withdrawing-coins)``: Optional + * ``[exchange-poll-success] => pending(withdraw-coins)``: Optional short-cut transition. Exchange was faster than the bank. * ``[action:abort] => aborting(bank)`` @@ -239,10 +239,10 @@ Transaction Type: Withdrawal exchange for the reserve status, waiting for the wire transfer to arrive at the exchange. - * ``[exchange-poll-success] => pending(withdrawing-coins)`` + * ``[exchange-poll-success] => pending(withdraw-coins)`` * ``[action:suspend] => suspended(exchange-wait-reserve)`` -* ``pending(withdrawing-coins)`` +* ``pending(withdraw-coins)`` State where we are finally withdrawing the actual coins. Depending on the AML and KYC thresholds, we may at any time transition into a @@ -254,8 +254,8 @@ Transaction Type: Withdrawal * ``[processed-success] => done`` * ``[processed-kyc-required] => pending(kyc)`` * ``[processed-aml-required] => pending(aml)`` - * ``[reserve-expired] => failed(reserve-expired)`` - * ``[action:suspend] => suspended(withdrawing-coins)`` + * ``[reserve-expired] => expired(reserve)`` + * ``[action:suspend] => suspended(withdraw-coins)`` * ``pending(kyc)`` @@ -264,7 +264,7 @@ Transaction Type: Withdrawal process and long-polls the exchange in anticipation of the user completing the KYC requirement. - * ``[poll-success] => pending(withdrawing-coins)`` + * ``[poll-success] => pending(withdraw-coins)`` * ``[action:suspend] => suspended(kyc)`` * ``suspended(kyc)`` @@ -289,7 +289,7 @@ Transaction Type: Withdrawal In any case, the wallet long-polls for the AML decision to be made or change (possibly at a lower frequeny in case of a freeze). - * ``[poll-success] => pending(withdrawing-coins)`` + * ``[poll-success] => pending(withdraw-coins)`` * ``[action:suspend] => suspended(aml)`` * ``suspended(aml)`` @@ -300,7 +300,7 @@ Transaction Type: Withdrawal * ``[action:delete] => deleted`` * ``[action:resume] => pending(aml)`` -* ``suspended(withdrawing-coins)`` +* ``suspended(withdraw-coins)`` In this state, the wallet should show how much money arrived into the wallet and the rest of the money will be sent back to the originating bank account @@ -347,7 +347,7 @@ Transaction Type: Payment to Merchant proposal that is invalid (e.g. malformed contract terms or bad signature). -* ``pending(proposed)`` +* ``monolog(merchant-order-proposed)`` Let the user accept (or refuse) the payment. @@ -417,20 +417,20 @@ Transaction Type: Payment to Merchant The purchase is completed. * ``[action:delete] => deleted`` - * ``[repurchase] => pending(repurchase-session-reset)``: Another offer + * ``[repurchase] => pending(rebind-session)``: Another offer became pending for this product and we need to update the session so that the user does not have to buy it again. * ``[check-refunds]` => pending(check-refunds)``: New refunds might be available for this purchase. -* ``pending(check-refunds)`` +* ``pending(check-refund)`` New refunds might be available for this purchase. This state must only be entered *after* the payment has successfully completed. It is not relevant for auto-refunds or refunds for incomplete payments. - * ``[refunds-checked] => pending(user-new-refunds)`` --- New + * ``[refunds-checked] => pending(user-new-refund)`` --- New refund(s) are available, user needs to confirm. * ``[refunds-checked] => done`` --- Refunds were checked, but no new refunds are available. @@ -439,14 +439,7 @@ Transaction Type: Payment to Merchant with errors. It stops the refund query, but the payment of course is left intact. -* ``pending(user-new-refunds)`` - - * ``[action:accept] => done``: User accepts refunds, - new refund transactions will be created. - * ``[action:refuse] => done``: User refuses new refunds, - no new refund transactions will be created. - -* ``pending(repurchase-session-reset)`` +* ``pending(rebind-session)`` The wallet should reset the associated session for the already purchased (digital) item. @@ -724,7 +717,7 @@ States and transitions: The wallet is creating a purse. Initial state. - * ``[process-success] => pending(qr-ready)``: The wallet has created the purse. + * ``[process-success] => pending(ready)``: The wallet has created the purse. * ``[process-failure] => aborting(refund)``: The purse creation failed. * ``[action:suspend] => suspended(purse-create)``: The user suspended the operation. @@ -733,7 +726,7 @@ States and transitions: * ``[action:resume] => pending(purse-create)``: The user resumed the operation. * ``[action:abort] => aborting(refund)``: The user aborted the operation. -* ``pending(qr-ready)`` +* ``pending(ready)`` In this state, the user can send / show the ``taler://`` URI or QR code to somebody else. @@ -871,7 +864,7 @@ States and transitions: The user is shown a hint where to begin the KYC process and the wallet long-polls on the KYC status. - * ``[poll-success] => pending(withdrawing-coins)`` + * ``[poll-success] => pending(withdraw-coins)`` * ``[action:suspend] => suspended(withdraw-kyc)`` * ``suspended(withdraw-kyc)`` @@ -887,7 +880,7 @@ States and transitions: We cannot withdraw more coins until AML rules are satisfied. The user is shown a hint as to the AML status (pending or frozen). - * ``[poll-success] => pending(withdrawing-coins)`` + * ``[poll-success] => pending(withdraw-coins)`` * ``[action:suspend] => suspended(withdraw-aml)`` * ``suspended(withdraw-aml)`` @@ -926,11 +919,11 @@ TODO: Also specify variant where account reserve needs to be created / funded fi The wallet is creating a purse. Initial state. - * ``[process-success] => pending(qr-ready)``: The wallet has created the purse. + * ``[process-success] => pending(ready)``: The wallet has created the purse. * ``[process-failure] => deleted``: The purse creation failed. We only show a transient error. * ``[action:abort] => deleted``: The user aborted the operation. -* ``pending(qr-ready)`` +* ``pending(ready)`` In this state, the user can send / show the ``taler://`` URI or QR code to somebody else. -- cgit v1.2.3