@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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.2",
2
+ "version": "0.7.3",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -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
- repayAmount = INF;
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
  }