@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
package/package.json
CHANGED
package/src/MoneyMarket.ts
CHANGED
|
@@ -210,7 +210,11 @@ export class MoneyMarketReadWrite extends MoneyMarketRead {
|
|
|
210
210
|
public async repay(amount: TokenAmount): Promise<TransactionResponse> {
|
|
211
211
|
var repayAmount: BN;
|
|
212
212
|
if (new BigNumber(amount.rawAmount()).lt(0)) {
|
|
213
|
-
|
|
213
|
+
if (isSameAddress(amount.token.address, ETHAddress)) {
|
|
214
|
+
repayAmount = BN.from((await this.getUserBorrowBalance(await this._networkConnection.signer!.getAddress())).rawAmount());
|
|
215
|
+
} else {
|
|
216
|
+
repayAmount = INF;
|
|
217
|
+
}
|
|
214
218
|
} else {
|
|
215
219
|
repayAmount = BN.from(amount.rawAmount());
|
|
216
220
|
}
|