-
-
Notifications
You must be signed in to change notification settings - Fork 129
remodel paid actions schema #2084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
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
Notes for 5f7ad5e:
I've added the flow for wrapping and creating invoice - where/how I think they're best done given our constraints. Obviously, none of this actually works yet but it logically lays out what I'm aiming for enough to proceed with adapting the state machine. Then I'll be rewriting the
payInType
modules to be consistent with the changes.Notes for e7c93f4:
State machine is conceptually complete and features additional transitions specifically for withdrawals.
PayIn
modules are ready for refactoring now.Notes for 396d643:
It's coming along. Many of the
PayIn
modules have been refactored. The logic of my draft still has a few holes in it (i.e. composablepayIn
s are needed, e.g. an item created with boost), but I have mods designed for all of these holes that I'm aware of. That'll be what I work on after refactoringzap
. Then I'll likely do another pass overapi/payIn/index.js
before beginning either a refactor of retries or refactoring my way to the frontend.Notes for c1c8380:
Rework of
api/payIn/index.js
which resulted in relatively declarativepayIn
modules (yay ... although it's still not as declarative as I'd like). I also addedPayIn
beneficiaries (payIns of payIns) to deal with the issue mentioned above. Once I finish refactoringzap
, I'll begin working on retries.Notes for b5f8aa8:
As of this commit, I have retries fairly well figured out. The main thing it's missing is it doesn't yet have a way to signal when manual retries should begin.
This is at the stage now where I can begin a conceptual refactor of code that will make use of the schema changes. Most of what I need to assess is:
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
)