@aurigami/sdk 0.7.2 → 0.7.3
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.
- package/dist/sdk.cjs.development.js +38 -7
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +38 -7
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/MoneyMarket.ts +5 -1
|
@@ -2845,14 +2845,45 @@ var MoneyMarketReadWrite = /*#__PURE__*/function (_MoneyMarketRead) {
|
|
|
2845
2845
|
while (1) {
|
|
2846
2846
|
switch (_context15.prev = _context15.next) {
|
|
2847
2847
|
case 0:
|
|
2848
|
-
if (new BigNumber(amount.rawAmount()).lt(0)) {
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
repayAmount = ethers.BigNumber.from(amount.rawAmount());
|
|
2848
|
+
if (!new BigNumber(amount.rawAmount()).lt(0)) {
|
|
2849
|
+
_context15.next = 16;
|
|
2850
|
+
break;
|
|
2852
2851
|
}
|
|
2853
2852
|
|
|
2854
2853
|
if (!isSameAddress(amount.token.address, ETHAddress)) {
|
|
2855
|
-
_context15.next =
|
|
2854
|
+
_context15.next = 13;
|
|
2855
|
+
break;
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
_context15.t0 = ethers.BigNumber;
|
|
2859
|
+
_context15.t1 = this;
|
|
2860
|
+
_context15.next = 6;
|
|
2861
|
+
return this._networkConnection.signer.getAddress();
|
|
2862
|
+
|
|
2863
|
+
case 6:
|
|
2864
|
+
_context15.t2 = _context15.sent;
|
|
2865
|
+
_context15.next = 9;
|
|
2866
|
+
return _context15.t1.getUserBorrowBalance.call(_context15.t1, _context15.t2);
|
|
2867
|
+
|
|
2868
|
+
case 9:
|
|
2869
|
+
_context15.t3 = _context15.sent.rawAmount();
|
|
2870
|
+
repayAmount = _context15.t0.from.call(_context15.t0, _context15.t3);
|
|
2871
|
+
_context15.next = 14;
|
|
2872
|
+
break;
|
|
2873
|
+
|
|
2874
|
+
case 13:
|
|
2875
|
+
repayAmount = INF;
|
|
2876
|
+
|
|
2877
|
+
case 14:
|
|
2878
|
+
_context15.next = 17;
|
|
2879
|
+
break;
|
|
2880
|
+
|
|
2881
|
+
case 16:
|
|
2882
|
+
repayAmount = ethers.BigNumber.from(amount.rawAmount());
|
|
2883
|
+
|
|
2884
|
+
case 17:
|
|
2885
|
+
if (!isSameAddress(amount.token.address, ETHAddress)) {
|
|
2886
|
+
_context15.next = 21;
|
|
2856
2887
|
break;
|
|
2857
2888
|
}
|
|
2858
2889
|
|
|
@@ -2860,10 +2891,10 @@ var MoneyMarketReadWrite = /*#__PURE__*/function (_MoneyMarketRead) {
|
|
|
2860
2891
|
value: repayAmount
|
|
2861
2892
|
}));
|
|
2862
2893
|
|
|
2863
|
-
case
|
|
2894
|
+
case 21:
|
|
2864
2895
|
return _context15.abrupt("return", this.auToken.connect(this._networkConnection.signer).repayBorrow(repayAmount));
|
|
2865
2896
|
|
|
2866
|
-
case
|
|
2897
|
+
case 22:
|
|
2867
2898
|
case "end":
|
|
2868
2899
|
return _context15.stop();
|
|
2869
2900
|
}
|