-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remove lends and loans from the store on zeroing out #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not excited about removeLendFromStore
and removeLoanFromStore
, especially the naming. I was tempted to recommend they be included in updateBucketLends
and updateAccountLoans
, but I see why that coupling would be undesirable.
How about we rework these methods as saveOrRemoveLend
and saveOrRemoveLoan
? The caller calls this method in lieu of entity.save, the method handles the branch, and no return value is needed.
Updated as recommended in a4ad178 I had originally just done the removal in those methods which worked with minimal changes but then I became concerned about the maintainability of that approach especially with the dependency on method ordering for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much thanks; LGTM.
Lend
andLoan
entities from the store when they zero out their attributes._handleBucketBankruptcy
function