Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notes for 7e93200:
These are my WIP schema changes. They haven't been integrated with the rest of the schema yet, because the changes will be dramatic.
Notes for 366c069:
I'm finding that it difficult to refactor without practically rewriting - mostly due to supporting multiple payment methods simultaneously and atomically. I'll likely create a minimal parallel implementation of
PayIn
s (formerly "paid actions") first that meets all the requirements, then merge it with the old code. Presumed order of operations:Some notable additions to the state machine are:
PENDING_INVOICE_CREATION
which is needed because we don't know the invoice amount in advance when paying partially with CCs/reward satsPayIn
record before we know if invoice creation succeeds, so in the case that a P2P invoice is impossible to create, we'll need the ability to retry server side to support CC fallbackFAILED
state as anenum
This PR aims to accomplish:
PayIn
will have ALL customer spending with a typePayOut
will have ALL customer earning with a typePayOut
Invoice
andWithdrawl
with state, intuition would suggest this is the case. Regardless, wip/tbd.predecessorId
inPayIn
where each retry creates a newPayIn
recordPayOut
is decoupled fromPayIn
)