Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Margin loan (#98) * move loan methods from web to augmint-js * basic address type * get loans from a loanManager * Move loan functions to augmint.ts * fixing loan tests * run one testfile * fix tests of LoanManager * loanManager passes the correct address * use string instead of BN based address * use the real address * lmContract is not an array! * fix Wei's toNumber and extend Tokens with toNumber * expose new eth backed loan on augmint js * collect loans * fix loan's due state * fix collect loans * raise collect gas fee * collect loans * update loanmanager with correct types * test: fix loanmanager test * update package to pre5 * create loanmanager instance * LoanManager is a static getter * test: fix loanmanager test mock products * test: use proper address checksum instead of tolowercase * loancount for loanmanagers * loanmanager test: add mock products and test data for legacy loanproducts, cleanup test * loanmanager test: add mock products and test data for legacy loanproducts, cleanup test * wrap margin loans * loanmanager test: add mock products and test data for legacy loanproducts, cleanup test * new eth backed loan with min rate! * loanmanager test: remove fixme-s (loanproduct code was fixed) * loanmanager test: remove fixme-s (loanproduct code was fixed) * config: allow newer yarn versions * loanmanager test: create legacy loanproduct from tuple * loanproduct: invert collateral ratio for legacy loanproducts * update Loan to handle margin loan * update loans * upgrade bn.js to 5.0 * add extra collateral api * test: additional units tests * minRate should be in eurocents * units: rounding modes for mul and div, tests * use Tokens.toString() instead of internal BN.toString() * units: add ceiling variant of multiplication * loanproduct: fix rounding in calculate methods * loanmanager test: fix collateral calculation test cases * connect contract with ethersjs * loanmanager test: fix test cases for calculating with negative interest rates * a Loan needs to know, which token was used * set package's version to prerelease * loanmanager test: test cases for invalid calls * proper connection handling for ethers.js * upgrade augmint-contracts to 1.1.0-pre7 * loanmanager test: update test with new ganache test product numbers (1.1.0-pre7) * bump version * loan: fix isRepayable condition (also check maturity) * upgrade augmint-contracts to 1.1.0-pre8 * bump pre version * fix tests WIP * Revert "fix tests WIP" This reverts commit 530e3ff. * loanmanager test: get maxloanamount from monetarysoupervisor * margin call rate calculator * rename marginCallRate getter to calculate * loan: helper method to calculate current collateral ratio * loan: helper method to calculate required collateral change amount * warning for marginCallRate * bump version number (0.3.4-pre4) * prepare a clean build before install * bump package version * loan: helper method to calculate new collateral ratio if collateralamount is changed * fix due state * bump version number to 0.3.4-pre6 * don't throw error if directories are not exists * reverse the instance lookup * fix LoanManager type check * never returns undefined * simplify and cache loanManagers * trenary insted of if * semicolon fix * use Promise.all instead of sequential await-s * use map instead of array of promises * extract flatten function * extract common pattern of collecting promises from multiple sources * simplify other collection of promises * remove spurious error handler * please the linter with type declarations * throw plain error on evironment configuration error instead of MissingContractError * loans: remove deprecated method, add bool flags instead * non-lazy loading of loanmanagers in Augmint * improve initialization of Augmint, do not allow missing environment, move the optional logic out of the constructor * bump version to 0.3.4-pre7 * fix: never returns undefined * move global variable into the Augmint class * optimize chunked query * fix chunked query in Exchange (decide chunksize only once, and use that), factor out isLegacyExchangeContract * linter: move private method after all public methods * optimize chunked query * fix typo * drop contractName * optimize chunked query * simplify getLoanManager methods in Augmint (use the map) * move utility functions to the utils package * bump version to 0.3.4-pre8 * tslint config * yarn task for the linter * tslint config * fix chunk size based pager * fix chunk sized loanmanger's pager * bump version to 0.3.4-pre9 * fix loanmanager lookup * bump to version 0.3.4-pre10 * bump to releasse version * fix(package): update @Augmint/contracts to version 1.1.0 * fix missing yarn.lock update
- Loading branch information