@aurigami/sdk 1.9.4 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2844,7 +2844,7 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
2844
2844
 
2845
2845
  _proto.getDepositAPY = /*#__PURE__*/function () {
2846
2846
  var _getDepositAPY = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
2847
- var supplyRatePerTimestamp;
2847
+ var supplyRatePerTimestamp, supplyRatePerDay;
2848
2848
  return runtime_1.wrap(function _callee4$(_context4) {
2849
2849
  while (1) {
2850
2850
  switch (_context4.prev = _context4.next) {
@@ -2854,9 +2854,10 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
2854
2854
 
2855
2855
  case 2:
2856
2856
  supplyRatePerTimestamp = _context4.sent;
2857
- return _context4.abrupt("return", new BigNumber(supplyRatePerTimestamp.toString()).multipliedBy(60 * 60 * 24 * 365).div(decimalFactor(18)));
2857
+ supplyRatePerDay = new BigNumber(supplyRatePerTimestamp.toString()).multipliedBy(ONE_DAY).div(decimalFactor(18));
2858
+ return _context4.abrupt("return", new BigNumber(supplyRatePerDay.plus(1)).pow(365).minus(1));
2858
2859
 
2859
- case 4:
2860
+ case 5:
2860
2861
  case "end":
2861
2862
  return _context4.stop();
2862
2863
  }
@@ -2873,7 +2874,7 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
2873
2874
 
2874
2875
  _proto.getBorrowAPY = /*#__PURE__*/function () {
2875
2876
  var _getBorrowAPY = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
2876
- var borrowRatePerTimestamp;
2877
+ var borrowRatePerTimestamp, borrowRatePerDay;
2877
2878
  return runtime_1.wrap(function _callee5$(_context5) {
2878
2879
  while (1) {
2879
2880
  switch (_context5.prev = _context5.next) {
@@ -2883,9 +2884,10 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
2883
2884
 
2884
2885
  case 2:
2885
2886
  borrowRatePerTimestamp = _context5.sent;
2886
- return _context5.abrupt("return", new BigNumber(borrowRatePerTimestamp.toString()).multipliedBy(60 * 60 * 24 * 365).div(decimalFactor(18)));
2887
+ borrowRatePerDay = new BigNumber(borrowRatePerTimestamp.toString()).multipliedBy(ONE_DAY).div(decimalFactor(18));
2888
+ return _context5.abrupt("return", new BigNumber(borrowRatePerDay.plus(1)).pow(365).minus(1));
2887
2889
 
2888
- case 4:
2890
+ case 5:
2889
2891
  case "end":
2890
2892
  return _context5.stop();
2891
2893
  }