Closed saturnial closed 6 years ago
Let me share a bit more about the changes given that I haven't been able to convene @graemecode @chrismin to discuss all that I've explored in pulling this together.
Loan
because it's a type that we don't expect outside developers to use. So it shouldn't be confusing to external developers.Debt
and an Investment
and that shared code is automatically generated by typescript for us when we use the extends
keyword.debtor
or creditor
.Investment
where they can additionally seizeCollateral
, which mutates statesDebt
where they can additionally returnCollateral
and makeRepayment
-- again, mutating stateA few other notes:
protocol
in Swift. Pretending like we have such technology when we're in Javascript is a bit of a farce IMO.Future proofing:
As for the size of the loan request class, the Agreement
base class was polluting the namespace, and wasn't valid, because its underlying functionality only applied to LoanRequest
. While large, the LoanRequest
class IMO feels feature complete at this point.
tl;dr:
Change List
LoanRequest
Loan
becomes the base class from whichInvestment
andDebt
inheritLoan
.Loan
featuresfetch
static initializer, which instantiates a generic instance of a child class from an IDInvestments
-> query for multiple investmentsDebts
-> query for multiple debtsTODO: